From: Lie Ryan on
On 01/17/10 12:29, Ethan Furman wrote:
> Lie Ryan wrote:
>> On 01/14/10 05:33, Albert van der Horst wrote:
>>
>>> (I encountered this before. A dictionary is a natural for a
>>> boardgame position, i.e. chess. Now we want to look up chess
>>> positions.)
>>
>>
>> or use collections.namedtuple
>
> Which is great until you want to make a move. ;)

No problem, just create a new namedtuple.

The OP wanted fast attribute lookup and AFAICT doesn't mention anything
about fast construction.
First  |  Prev  | 
Pages: 1 2
Prev: BeautifulSoup
Next: A simple-to-use sound file writer