[Patches] [ python-Patches-748126 ] Nails down the semantics of
dict setitem
SourceForge.net
noreply at sourceforge.net
Sat Aug 7 18:43:12 CEST 2004
Patches item #748126, was opened at 2003-06-03 12:57
Message generated for change (Comment added) made by mwh
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=748126&group_id=5470
Category: Documentation
Group: None
>Status: Closed
>Resolution: Wont Fix
Priority: 5
Submitted By: David Abrahams (david_abrahams)
Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: Nails down the semantics of dict setitem
Initial Comment:
You could consider accomplishing the same thing in the
footnotes area, but I didn't see any reason to make the
reader jump around for this info.
----------------------------------------------------------------------
>Comment By: Michael Hudson (mwh)
Date: 2004-08-07 17:43
Message:
Logged In: YES
user_id=6656
I agree. Closing.
----------------------------------------------------------------------
Comment By: Michael Chermside (mcherm)
Date: 2004-08-07 16:00
Message:
Logged In: YES
user_id=99874
I asked about this on python-dev. Turns out that the
behavior is the same in CPython and Jython (at least), but
that it is officially undefined in the language (ie, if
someone finds a more efficient way to implement a dict which
happens to alter what happens when assigning to existing
keys, then it might change). Therefore, I think it should
NOT be documented. It's rare that people would create
objects that compare equal and yet care which one is used,
and anyone doing so should know what they're doing well
enough to test it out.
----------------------------------------------------------------------
Comment By: David Abrahams (david_abrahams)
Date: 2003-07-04 03:42
Message:
Logged In: YES
user_id=52572
I think I originally tried to attach a patch which SF dropped
due to one of its usual bugs. I think the question was
whether d[k] = y would unconditionally set the identity of the
key object in d to k, or whether any previous equal key in
that "slot" would be preserved. It's the latter, and the
current docs don't say which one it is.
----------------------------------------------------------------------
Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2003-07-04 02:06
Message:
Logged In: YES
user_id=3066
This report is very vague. What part of the documentation
are you referring to, and how do you think it should be changed.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=748126&group_id=5470
More information about the Patches
mailing list