]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Proper support for binary operators, including true division and floor
authorGuido van Rossum <guido@python.org>
Wed, 8 Aug 2001 22:26:22 +0000 (22:26 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 8 Aug 2001 22:26:22 +0000 (22:26 +0000)
commitdc91b99f23610573c275cb70f987bcf56eee0d23
treeef48c73f5d694dd01166c48129be20976156032a
parentab04653715008365b65b0a6926fce3b42379a21a
Proper support for binary operators, including true division and floor
division.  The basic binary operators now all correctly call the
__rxxx__ variant when they should.

In type_new(), I now make the new type a new-style number unless it
inherits from an old-style number that has numeric methods.

By way of cosmetics, I've changed the signatures of the SLOT<i> macros
to take actual function names and operator names as strings, rather
than rely on C preprocessor symbol manipulations.  This makes the
calls slightly more verbose, but greatly helps simple searches through
the file: you can now find out where "__radd__" is used or where the
function slot_nb_power() is defined and where it is used.
Objects/typeobject.c