Code Bash!!! (CacheDictionary)
Andrew Dalke
dalke at dalkescientific.com
Thu Mar 7 07:37:26 EST 2002
Sean 'Shaleh' Perry:
>*) maxlength=1000, I belive this variable is poorly named. A dictionary
>is not 10 items long, it contains 10 items. Something like maxitems
>or maxcount.
>>> d = {"a": "b", "c": "d"}
>>> len(d)
2
>>>
A dictionary *can* be written as having a length, although "maxlen"
would probably be more technically correct. To me, "maxcount" reminds
me of the "count" method of string, so I would ask "count of what?"
Andrew
dalke at dalkescientific.com
More information about the Python-list
mailing list