开发者

PyDev: Undefined variable from import: __name__

开发者 https://www.devze.com 2023-03-01 08:07 出处:网络
I use regu开发者_C百科larly the __name__ property of classes in my code (which works perfectly in Python) but PyDev is always marking it as an error (Undefined variable from import).

I use regu开发者_C百科larly the __name__ property of classes in my code (which works perfectly in Python) but PyDev is always marking it as an error (Undefined variable from import).

I tried to add the __name__ to the bulletin imports but this did not remove the problem.

When I use auto completion, PyDev finds a __class__ property when typing a . behind a class which is wrong. But if I use __class__ property anyway, PyDev finds the __name__ property.

Is there any bug in PyDev that has to do with mixing up classes with instanced objects? Is there any workaround?

Thanks for any help.


It's a bug in PyDev. Please report that in the PyDev sf tracker. See: http://pydev.org/about.html for links.


I just ran into this problem. After reading some forms on it, it looks like it's a problem with the console or kernel not loading fast-enough...

I just closed the document and re-opened it and all the errors went away.

0

精彩评论

暂无评论...
验证码 换一张
取 消