[Tutor] Projects (fwd)
ricaraoz at gmail.com
Fri Jan 25 10:51:55 CET 2008
>> Nope, if you read the code you'll see the only mapping done is up to 20
>> and then by tens up to 100, that's all.
>> The same code could be used with a list, you'd only have to change the
>> exception name.
> I see. There were "..." in between each of the tens entries which I took to
> mean that "big huge dictionary but left out some values in email for
> simplicity". I feel ashamed for not recognizing that the ellipses where
> there for some other purpose. ;-)
Checked my mail and yes, it was not outright clear what I meant in the
dictionary, sorry. Anyway if you check the rest of the code you'll see
it works as I said and you don't use the intermediate values between the
tens. As usual I learned something from the exercise, I thought that
indexed access would be faster than list access, didn't think lists
where implemented as C arrays (because they have no fixed size), now I
can see tuples will be faster and will save memory because memory will
not have to be reserved in chunks.
More information about the Tutor