Re: (objects as) mutable dictionary keys
From: Steve Holden (steve_at_holdenweb.com)
Date: 01/14/05
- Next message: Steve Holden: "Re: python and macros (again) [Was: python3: 'where' keyword]"
- Previous message: Evan Simpson: "Producer/consumer Queue "trick""
- In reply to: Antoon Pardon: "Re: (objects as) mutable dictionary keys"
- Next in thread: Antoon Pardon: "Re: (objects as) mutable dictionary keys"
- Reply: Antoon Pardon: "Re: (objects as) mutable dictionary keys"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 14 Jan 2005 17:22:20 -0500
Antoon Pardon wrote:
> Op 2005-01-14, Peter Maas schreef <peter@somewhere.com>:
>
>>I have summarized the discussion about the usability of lists (and
>>and other mutable types) as dictionary keys and put it into the
>>Python wiki.URL: http://www.python.org/moin/DictionaryKeys.
>>
>>This summary might be used as a reference should the 'mutable
>>dictionary keys' issue come up again in c.l.py.
>>
>
> I had a look and I think you should correct the followingr:
>
> Dictionary lookup with mutable types like lists is a source of
> unpleasant surprises for the programmer and therefore impossible in
> Python.
>
Better, perhaps, to say:
Dictionary lookup with mutable types like lists can be a
source of unpleasant surprises for the programmer and
therefore not recommended in Python.
>
> It is not impossible in Python. It may be discouraged but it is not
> impossible since I have already done so.
>
If I discouraged you from shooting yourself in the foot would you do
that too?
some-people-just-won't-be-told-ly y'rs - steve
-- Steve Holden http://www.holdenweb.com/ Python Web Programming http://pydish.holdenweb.com/ Holden Web LLC +1 703 861 4237 +1 800 494 3119
- Next message: Steve Holden: "Re: python and macros (again) [Was: python3: 'where' keyword]"
- Previous message: Evan Simpson: "Producer/consumer Queue "trick""
- In reply to: Antoon Pardon: "Re: (objects as) mutable dictionary keys"
- Next in thread: Antoon Pardon: "Re: (objects as) mutable dictionary keys"
- Reply: Antoon Pardon: "Re: (objects as) mutable dictionary keys"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|