Array of dict or lists or ....?

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Tue Oct 7 03:19:01 CEST 2008


Tim Chase:

>    __repr__ = __str__

I don't know if that's a good practice.


>      try:
>        data.setdefault(
>          state, {}).setdefault(
>          county, {}).setdefault(
>          cls, Attendence(max_students)).accrue(enrolled)
>      except TooManyAttendants:

I suggest to decompress that part a little, to make it a little more
readable.

Bye,
bearophile



More information about the Python-list mailing list