Message197613
============================================================================
--> class Test:
... this = 'that'
... these = 'those'
...
--> Test.this
'that'
--> Test.this.these
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'str' object has no attribute 'these'
============================================================================
This is not normal Python behavior, nor does it seem to be behavior intrinsic to enumerations. It also adds an Alice-in-Wonderland quality to Enums:
============================================================================
--> red = Color.red
--> red.blue.blue.red.green.blue
<Color.blue: 3>
============================================================================
We're going to have to live without this particular "feature". |
|
Date |
User |
Action |
Args |
2013-09-13 17:23:07 | ethan.furman | set | recipients:
+ ethan.furman, barry, lambacck, eli.bendersky |
2013-09-13 17:23:07 | ethan.furman | set | messageid: <1379092987.41.0.593922682652.issue19011@psf.upfronthosting.co.za> |
2013-09-13 17:23:07 | ethan.furman | link | issue19011 messages |
2013-09-13 17:23:07 | ethan.furman | create | |
|