Author: Philip Jenvey <[email protected]>
Branch: py3k
Changeset: r63296:e508ea132134
Date: 2013-04-12 15:25 -0700
http://bitbucket.org/pypy/pypy/changeset/e508ea132134/

Log:    latest slotdefs

diff --git a/pypy/module/cpyext/slotdefs.py b/pypy/module/cpyext/slotdefs.py
--- a/pypy/module/cpyext/slotdefs.py
+++ b/pypy/module/cpyext/slotdefs.py
@@ -481,27 +481,23 @@
                "x.__delitem__(y) <==> del x[y]"),
 
         BINSLOT("__add__", nb_add, slot_nb_add,
-                "+"),
+            "+"),
         RBINSLOT("__radd__", nb_add, slot_nb_add,
                  "+"),
         BINSLOT("__sub__", nb_subtract, slot_nb_subtract,
-                "-"),
+            "-"),
         RBINSLOT("__rsub__", nb_subtract, slot_nb_subtract,
                  "-"),
         BINSLOT("__mul__", nb_multiply, slot_nb_multiply,
-                "*"),
+            "*"),
         RBINSLOT("__rmul__", nb_multiply, slot_nb_multiply,
                  "*"),
-        BINSLOT("__div__", nb_divide, slot_nb_divide,
-                "/"),
-        RBINSLOT("__rdiv__", nb_divide, slot_nb_divide,
-                 "/"),
         BINSLOT("__mod__", nb_remainder, slot_nb_remainder,
-                "%"),
+            "%"),
         RBINSLOT("__rmod__", nb_remainder, slot_nb_remainder,
                  "%"),
         BINSLOTNOTINFIX("__divmod__", nb_divmod, slot_nb_divmod,
-                "divmod(x, y)"),
+            "divmod(x, y)"),
         RBINSLOTNOTINFIX("__rdivmod__", nb_divmod, slot_nb_divmod,
                  "divmod(y, x)"),
         NBSLOT("__pow__", nb_power, slot_nb_power, wrap_ternaryfunc,
@@ -527,38 +523,30 @@
         RBINSLOT("__ror__", nb_or, slot_nb_or, "|"),
         UNSLOT("__int__", nb_int, slot_nb_int, wrap_unaryfunc,
                "int(x)"),
-        UNSLOT("__long__", nb_long, slot_nb_long, wrap_unaryfunc,
-               "long(x)"),
         UNSLOT("__float__", nb_float, slot_nb_float, wrap_unaryfunc,
                "float(x)"),
-        UNSLOT("__oct__", nb_oct, slot_nb_oct, wrap_unaryfunc,
-               "oct(x)"),
-        UNSLOT("__hex__", nb_hex, slot_nb_hex, wrap_unaryfunc,
-               "hex(x)"),
         NBSLOT("__index__", nb_index, slot_nb_index, wrap_unaryfunc,
                "x[y:z] <==> x[y.__index__():z.__index__()]"),
         IBSLOT("__iadd__", nb_inplace_add, slot_nb_inplace_add,
-               wrap_binaryfunc, "+"),
+               wrap_binaryfunc, "+="),
         IBSLOT("__isub__", nb_inplace_subtract, slot_nb_inplace_subtract,
-               wrap_binaryfunc, "-"),
+               wrap_binaryfunc, "-="),
         IBSLOT("__imul__", nb_inplace_multiply, slot_nb_inplace_multiply,
-               wrap_binaryfunc, "*"),
-        IBSLOT("__idiv__", nb_inplace_divide, slot_nb_inplace_divide,
-               wrap_binaryfunc, "/"),
+               wrap_binaryfunc, "*="),
         IBSLOT("__imod__", nb_inplace_remainder, slot_nb_inplace_remainder,
-               wrap_binaryfunc, "%"),
+               wrap_binaryfunc, "%="),
         IBSLOT("__ipow__", nb_inplace_power, slot_nb_inplace_power,
-               wrap_binaryfunc, "**"),
+               wrap_binaryfunc, "**="),
         IBSLOT("__ilshift__", nb_inplace_lshift, slot_nb_inplace_lshift,
-               wrap_binaryfunc, "<<"),
+               wrap_binaryfunc, "<<="),
         IBSLOT("__irshift__", nb_inplace_rshift, slot_nb_inplace_rshift,
-               wrap_binaryfunc, ">>"),
+               wrap_binaryfunc, ">>="),
         IBSLOT("__iand__", nb_inplace_and, slot_nb_inplace_and,
-               wrap_binaryfunc, "&"),
+               wrap_binaryfunc, "&="),
         IBSLOT("__ixor__", nb_inplace_xor, slot_nb_inplace_xor,
-               wrap_binaryfunc, "^"),
+               wrap_binaryfunc, "^="),
         IBSLOT("__ior__", nb_inplace_or, slot_nb_inplace_or,
-               wrap_binaryfunc, "|"),
+               wrap_binaryfunc, "|="),
         BINSLOT("__floordiv__", nb_floor_divide, slot_nb_floor_divide, "//"),
         RBINSLOT("__rfloordiv__", nb_floor_divide, slot_nb_floor_divide, "//"),
         BINSLOT("__truediv__", nb_true_divide, slot_nb_true_divide, "/"),
@@ -570,12 +558,8 @@
 
         TPSLOT("__str__", tp_str, slot_tp_str, wrap_unaryfunc,
                "x.__str__() <==> str(x)"),
-        TPSLOT("__str__", tp_print, NULL, NULL, ""),
         TPSLOT("__repr__", tp_repr, slot_tp_repr, wrap_unaryfunc,
                "x.__repr__() <==> repr(x)"),
-        TPSLOT("__repr__", tp_print, NULL, NULL, ""),
-        TPSLOT("__cmp__", tp_compare, _PyObject_SlotCompare, wrap_cmpfunc,
-               "x.__cmp__(y) <==> cmp(x,y)"),
         TPSLOT("__hash__", tp_hash, slot_tp_hash, wrap_hashfunc,
                "x.__hash__() <==> hash(x)"),
         FLSLOT("__call__", tp_call, slot_tp_call, (wrapperfunc)wrap_call,
@@ -615,7 +599,7 @@
                wrap_descr_delete, "descr.__delete__(obj)"),
         FLSLOT("__init__", tp_init, slot_tp_init, (wrapperfunc)wrap_init,
                "x.__init__(...) initializes x; "
-               "see x.__class__.__doc__ for signature",
+               "see help(type(x)) for signature",
                PyWrapperFlag_KEYWORDS),
         TPSLOT("__new__", tp_new, slot_tp_new, NULL, ""),
         TPSLOT("__del__", tp_del, slot_tp_del, NULL, ""),
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to