简体   繁体   中英

PyDev: Undefined variable from import: __name__

I use regularly 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM