0
0
mirror of https://github.com/python/cpython.git synced 2024-11-29 00:56:12 +01:00
cpython/Parser
Guido van Rossum 4668b000a1 Implement PEP 238 in its (almost) full glory.
This introduces:

- A new operator // that means floor division (the kind of division
  where 1/2 is 0).

- The "future division" statement ("from __future__ import division)
  which changes the meaning of the / operator to implement "true
  division" (where 1/2 is 0.5).

- New overloadable operators __truediv__ and __floordiv__.

- New slots in the PyNumberMethods struct for true and floor division,
  new abstract APIs for them, new opcodes, and so on.

I emphasize that without the future division statement, the semantics
of / will remain unchanged until Python 3.0.

Not yet implemented are warnings (default off) when / is used with int
or long arguments.

This has been on display since 7/31 as SF patch #443474.

Flames to /dev/null.
2001-08-08 05:00:18 +00:00
..
.cvsignore
acceler.c
assert.h
bitset.c
firstsets.c
grammar1.c
grammar.c
intrcheck.c RISCOS changes by dschwertberger. 2001-03-02 06:34:14 +00:00
listnode.c
metagrammar.c
myreadline.c RISCOS changes by dschwertberger. 2001-03-02 06:34:14 +00:00
node.c
parser.c Fis SF bug #442647: not all forms of legal future statements were 2001-07-19 15:27:45 +00:00
parser.h Preliminary support for "from __future__ import generators" to enable 2001-07-15 21:08:29 +00:00
parsetok.c Add a really stupid warning about 'yield' used as an identifier. 2001-07-17 16:53:11 +00:00
pgen.c
pgen.h
pgenmain.c
printgrammar.c
tokenizer.c Implement PEP 238 in its (almost) full glory. 2001-08-08 05:00:18 +00:00
tokenizer.h