(objects as) mutable dictionary keys
Nick Coghlan
ncoghlan at iinet.net.au
Mon Jan 17 05:11:22 EST 2005
Antoon Pardon wrote:
> What are good arguments or bad and how much weight they have depends
> on the person and on the circumstances. So a simple rule like:
> Never use a mutable as a key in a dictionary will sometimes not be
> the best solution.
True - but I think a purely identity based dictionary *is* the solution for most
such cases where the standard Python rule doesn't apply :)
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at email.com | Brisbane, Australia
---------------------------------------------------------------
http://boredomandlaziness.skystorm.net
More information about the Python-list
mailing list