shift operators?

Martin v. Loewis martin at v.loewis.de
Mon Jan 7 18:35:46 EST 2002


Andrew Koenig <ark at research.att.com> writes:

> Is it just backward compatibility that keeps 1<<40 from yielding
> 1099511627776L as well?

One may argue that this follows the PEP, at

http://python.sourceforge.net/peps/pep-0237.html

Python 2.2 implements phase A of this PEP, where there is no semantic
change except that operations that previously raised overflow errors
now succeed, and return a long object.

Phase B.1 will address further semantic differences, producing a
warning if code is executed whose semantics changed. In B.2, these
warnings will be removed.

HTH,
Martin




More information about the Python-list mailing list