Type constants in type module

Terry Reedy tjreedy at udel.edu
Sun Nov 2 17:51:32 EST 2003


"Dave Harris" <dpharris76 at msn.com> wrote in message
news:mailman.341.1067792539.702.python-list at python.org...
If
    splunge = 3
    forMeToo = splunge.__add__

type(forMeToo) prints:

<type 'method-wrapper'>

The constants defined in the types.py module do not include this type.
Is this an oversight or am I looking at a detail which is supposed to
be hidden from view?
-----------------
type(3.__add__) should give you same puzzle.

Yes, method wrapper is a current implementation detail which is not
part of language per se.  But it is obviously not hidden ;-).

Terry J. Reedy






More information about the Python-list mailing list