Guido van Rossum wrote: > The __hash__() method qualifies, which is why it's a tough call (I'll > come back on that; I want to come up with a reason why __hash__() > should remain a method). The iterator-getting example above doesn't > qualify.
Yeah - I felt it was a borderline case, so thought it was a good case for setting a precedent. Pros for making it an attribute/property: 1. It should return the same value each time. 2. Faster access for many types. Cons: 1. Gratuitous breakage with 2.x. 2. If it's a property, subclasses need to override the getter and recreate the property if they want to change the hash of the object (unless the base class uses a lazy property). Tim Delaney _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com