#1511 __name__ is marked as undefined in dict definitions

1.5.0
open
nobody
None
5
2012-05-25
2012-05-25
Cezary Wagner
No

See example code:

class __LazyDeliveryStateMajorKeyToHandlerInfo(object): pass
class __LazyReservationStateMajorKeyToHandlerInfo(object): pass

class __LazyOrderClassNameToLazyLoader(object):
@staticmethod
def _put():
return {
Order.__name__:
__LazyDeliveryStateMajorKeyToHandlerInfo,
OrderRestaurantReservation.__name__:
__LazyReservationStateMajorKeyToHandlerInfo
}

If you put this code __name__ will be marked as red with comment "undefined variable from import: __name__" - what is wrong since it is builtin.

It onnly happend in dict definitions like {}.

Discussion

  • Cezary Wagner
    Cezary Wagner
    2012-05-25

    • milestone: --> 1.5.0