@property not working with other decorators
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- javascript, python
- 領域
- compilers
調査の方向性
Start with the decorator example in Test.py and compare it with the generated Test.js, focusing on how @property is combined with another decorator. Reproduce the callable error from the generated output and trace the compiler's decorator handling. Done means the example transpiles and runs without treating the property object as a callable, while preserving normal property behavior.
索引モデルが issue の本文から書いたものです。
説明
Test.py
def deco(func):
def inner(func):
return func()
return inner
class ProfilePlotCanvas:
@deco
@property
def _make_plot(self):
return
Test.js
// Transcrypt'ed from Python, 2019-08-16 10:19:00
import {AssertionError, AttributeError, BaseException, DeprecationWarning, Exception, IndexError, IterableError, KeyError, NotImplementedError, RuntimeWarning, StopIteration, UserWarning, ValueError, Warning, __JsIterator__, __PyIterator__, __Terminal__, __add__, __and__, __call__, __class__, __envir__, __eq__, __floordiv__, __ge__, __get__, __getcm__, __getitem__, __getslice__, __getsm__, __gt__, __i__, __iadd__, __iand__, __idiv__, __ijsmod__, __ilshift__, __imatmul__, __imod__, __imul__, __in__, __init__, __ior__, __ipow__, __irshift__, __isub__, __ixor__, __jsUsePyNext__, __jsmod__, __k__, __kwargtrans__, __le__, __lshift__, __lt__, __matmul__, __mergefields__, __mergekwargtrans__, __mod__, __mul__, __ne__, __neg__, __nest__, __or__, __pow__, __pragma__, __proxy__, __pyUseJsNext__, __rshift__, __setitem__, __setproperty__, __setslice__, __sort__, __specialattrib__, __sub__, __super__, __t__, __terminal__, __truediv__, __withblock__, __xor__, abs, all, any, assert, bool, bytearray, bytes, callable, chr, copy, deepcopy, delattr, dict, dir, divmod, enumerate, filter, float, getattr, hasattr, input, int, isinstance, issubclass, len, list, map, max, min, object, ord, pow, print, property, py_TypeError, py_iter, py_metatype, py_next, py_reversed, py_typeof, range, repr, round, set, setattr, sorted, str, sum, tuple, zip} from './org.transcrypt.__runtime__.js';
var __name__ = '__main__';
export var deco = function (func) {
var inner = function (func) {
return func ();
};
return inner;
};
export var ProfilePlotCanvas = __class__ ('ProfilePlotCanvas', [object], {
__module__: __name__,
get _get__make_plot () {return __get__ (this, deco (property (function (self) {
return ;
})));}
});
Object.defineProperty (ProfilePlotCanvas, '_make_plot', property.call (ProfilePlotCanvas, ProfilePlotCanvas._get__make_plot));;
When @property is not the only decorator, it is added to the list of decorators in addition to the usual Object.defineProperty behavior. Since property() returns an object and not a callable, it causes an error.
- 主要言語
- Python
- スター
- 2.9k
- フォーク
- 218
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
TranscryptOrg/Transcrypt のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
TranscryptOrg/Transcrypt#913 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
TranscryptOrg/Transcrypt#911 · コメント 2 件 ·
-
IS: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
TranscryptOrg/Transcrypt#908 ·
-
SUB: documentation
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
TranscryptOrg/Transcrypt#656 · コメント 7 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 76/100
TranscryptOrg/Transcrypt#914 ·
TranscryptOrg/Transcrypt の issue をすべて見る
似ている issue
-
link-check link-check:sphinx-theme
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
qgis/QGIS-Documentation#11275 ·
-
bug priority:normal ready-for-dev
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
OpenHands/extensions#626 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
CSCfi/sd-search-api#39 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100