A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2013-May/125779.html below:

[Python-Dev] PEP-435 reference implementation

[Python-Dev] PEP-435 reference implementation [Python-Dev] PEP-435 reference implementationEthan Furman ethan at stoneleaf.us
Wed May 1 00:34:36 CEST 2013
On 04/30/2013 03:24 PM, Glenn Linderman wrote:
> On 4/30/2013 1:12 PM, Ethan Furman wrote:
>> Greetings,
>>
>> Eli asked me to put the reference implementation here for review.
>>
>> It is available at https://bitbucket.org/stoneleaf/aenum in ref435.py and test_ref435.py
>
> Thanks for the code reference.
>
> Tests ran fine here on Python 3.3
>
> If I alter test_ref435.py at the end, as follows, I get an error: nothing matches 'BDFL'
> Can someone explain why?
>
>
> if __name__ == '__main__':
>      class AnotherName( Name ):
>          'just uses prior names'
>      print(AnotherName['BDFL'])

Because Guido said no subclassing.

At this point, if you try to subclass all your getting is the same type.  So AnotherName is a string Enumeration.

--
~Ethan~
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4