Array of dict or lists or ....?

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Mon Oct 6 21:19:01 EDT 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