Le Mon, 6 May 2013 23:18:54 +1000, Nick Coghlan <ncoghlan at gmail.com> a écrit : > > IIRC, Jython just delays calculating the object id() until it is > called, and lives with it potentially being incredibly expensive to > calculate. Is there some way PyPy can run with a model where "is" is > defined in terms of values for immutable objects, with a lazily > populated mapping from values to numeric ids if you're forced to > define them through an explicit call to id()? This sounds reasonable. Actually, for small ints, id() could simply be a tagged pointer (e.g. "1 + 2 * myint.value"). > We're not going to change the language design because people don't > understand the difference between "is" and "==" and then wrongly blame > PyPy for breaking their code. Well, if I'm doing: mylist = [x] and ``mylist[0] is x`` returns False, then I pretty much consider the Python implementation to be broken, not my code :-) Regards Antoine.
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