0

code:

class MyEnumType(object):
    A = 1
    B = 2
    __C = 3

MyEnumType.A
MyEnumType.B
MyEnumType.__C

output:

Traceback (most recent call last):
  File "test.py", line 8, in <module>
    MyEnumType.__C
AttributeError: type object 'MyEnumType' has no attribute '__C'

Python version 2.7.17

James Wierzba
  • 14,715
  • 12
  • 69
  • 110

0 Answers0