"Martin v. Löwis" <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: >>>I trusted the doco which defines a set as "an unordered collection of >>>immutable values" (http://docs.python.org/lib/types-set.html). >> If the hash changes, you've screwed up the set. What it really should >> say is "collection of objects with fixed hashes", or words to that >> effect. Do you want to file a PR on this? > It's more than that: you really mean "hashable values", where "hashable" > does not just imply that the hash value is fixed, but also that the > equal objects hash same.
I would have phrased it as "identical" instead of equal. Sets should hold unique elements, where "unique" depends on the use at hand. For some uses, "==" might be appropriate. For others, "is" might be appropriate. Would you care to suggest an improved wording? <mike -- Mike Meyer <[EMAIL PROTECTED]> http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo/python-list