【发布时间】:2017-01-03 00:37:43
【问题描述】:
class Event(object):
can_i_autocomplete_this = True
class App(object):
def decorator(self, func):
self.func = func
def call():
self.func(Event())
app = App()
@app.decorator
def hello(something):
print(something.can_i_autocomplete_this)
app.call()
我使用这样的装饰器。
但在这种情况下,hello 方法自动完成中的 something 参数在 IDE(pycharm) 中不起作用。 (必须支持python 2.7)
在这种情况下如何使用自动完成功能?
谢谢。
【问题讨论】:
标签: python autocomplete pycharm python-decorators