[Guido] >> I guess that means >> I have to work harder and make the single int type support both >> representations. I'm sure it can be done. Guido van Rossum wrote: >>>So the question is, does long have operations that int doesn't have? >>>And if so, why can't those operations be added to int? And if there's >>>a reason, is it good enough? >> >>Taking into account their difference in representation, a long can support >>1<<32, but an int can't. > > We're talking about a hypothetical int here where that operation > returns 4294967296L. (Not so hypothetical, it's implemented in Python > 2.4 in CVS.) The 'performance hack' point of view I was trying to suggest was along the lines of: "Python integers are capable of storing values of arbitrary magnitude, subject only to the memory capacity of the machine. As a matter of performance, Python will use native C integers (and native arithmetic) when the stored value is small enough to fit." That is, I was agreeing with Guido's first point above.
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