Jim Jewett wrote: > Jim Fulton asked how this canonical ordering > should be defined. > > The obvious answer is "Just like the __lt__ > operator today". But it doesn't actually *need* > to be that sensible, if there are strong reasons > to prefer a simpler ordering. > > The more I think about it, though, __eq__ really > does need to be honored; I don't want an > "Are these two containers equivalent?" > test to depend on how well the memory > subsystem happened to be working. > > Given that, also honoring an explicit __lt__ > isn't much of an extra burden, and will make > the ordering much more useful for debugging > and output. Tell me: >>> a = [0] * 3 >>> b = [0] * 3 >>> a[0] = b >>> b[0] = a What order should a and b have? --Scott David Daniels Scott.Daniels at Acm.Org
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4