Message 110423 - Python tracker
Message110423
| Author | pitrou |
|---|---|
| Recipients | alexandre.vassalotti, belopolsky, eric.araujo, grubert, jackdied, pitrou, rhettinger, schmir, zzzeek |
| Date | 2010-07-16.09:51:50 |
| SpamBayes Score | 1.6701617e-05 |
| Marked as misclassified | No |
| Message-id | <1279273913.77.0.546482512706.issue9269@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
> The test case in cycle.py tricks set into accepting mutable objects by > creating a class with default __hash__. This falls into a category of > "don't do it". I beg to differ. There is a reason we allow people to define __hash__ and that's to define arbitrary hashable types (not only immutable ones). Furthermore, the default __hash__ (equivalent to id()) is also perfectly useful in some cases. And in object-oriented designs it is very common to have reference cycles. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2010-07-16 09:51:54 | pitrou | set | recipients: + pitrou, rhettinger, belopolsky, grubert, jackdied, alexandre.vassalotti, schmir, eric.araujo, zzzeek |
| 2010-07-16 09:51:53 | pitrou | set | messageid: <1279273913.77.0.546482512706.issue9269@psf.upfronthosting.co.za> |
| 2010-07-16 09:51:51 | pitrou | link | issue9269 messages |
| 2010-07-16 09:51:50 | pitrou | create | |