no-clobber dicts?
Steven D'Aprano
steve at REMOVE-THIS-cybersource.com.au
Tue Aug 4 23:07:26 EDT 2009
On Wed, 5 Aug 2009 06:01 am kj wrote:
> In <pan.2009.08.04.03.23.19 at REMOVE.THIS.cybersource.com.au> Steven
> D'Aprano <steven at REMOVE.THIS.cybersource.com.au> writes:
>
>>class ConstantNamespace(dict):
> <snip>
>
>>I also have a series of unit tests for it if you're interested in them.
>
> Actually, come to think of it, I think I'll take you up on this.
> I'd love to see those tests. Unit testing in Python is in area I
> need to work on.
No problem. Here you go:
http://www.cybersource.com.au/users/steve/python/constants.py
Comments welcome.
--
Steven
More information about the Python-list
mailing list