Hans Müller wrote:
Hello,
I have a lot of items having a name and a given sequence.
To access these items fast in a sequence order they should be used as a
list, but to be fetched fast by name they also should be in a dictionary.
Have you looked at namedtuple or OrderedDict in collections mo
On Thu, Sep 10, 2009 at 12:51 PM, Hans Müller wrote:
> Diez B. Roggisch wrote:
>> Hans Müller wrote:
>>> But what happens if i modify
>>> a[1].value1 = 1000
>>> is
>>> d["aax"].value1 now 1000 or still "hello" as in this example ?
>>
>> It's changed. Didn't you try that?
>>
> to be true, no - not
Diez B. Roggisch wrote:
> Hans Müller wrote:
>
>> Hello,
>>
>> I have a lot of items having a name and a given sequence.
>>
>> To access these items fast in a sequence order they should be used as
>> a list, but to be fetched fast by name they also should be in a
>> dictionary.
>>
>> Code could be
Hans Müller wrote:
> Hello,
>
> I have a lot of items having a name and a given sequence.
>
> To access these items fast in a sequence order they should be used as
> a list, but to be fetched fast by name they also should be in a
> dictionary.
>
> Code could be something like this.
>
> class i