[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-list
Subject:    Re: PEP 354: Enumerations in Python
From:       Paul Rubin <"http://phr.cx" () NOSPAM ! invalid>
Date:       2006-03-01 2:15:57
Message-ID: 7xhd6ilxk2.fsf () ruckus ! brouhaha ! com
[Download RAW message or body]

Ben Finney <bignose+hates-spam@benfinney.id.au> writes:
> These don't seem simple or elegant. I don't see a particular benefit
> to doing it that way, rather than being explicit about manipulating
> the member list::
> 
>     pentium_instructions = enum('add', 'sub', 'mul')
>     athlon64_instructions = enum(
>         *[ str(i) for i in pentium_instructions] + ['add64', 'sub64'] )

I don't know about this.  It makes athlon64_instructions a completely
separate enum from pentium_instructions.  It could be that
athlon64_instructions.add should be the same as pentium_instructions.add .
-- 
http://mail.python.org/mailman/listinfo/python-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic