This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steven.daprano
Recipients bup, ronaldoussoren, steven.daprano
Date 2019-02-08.12:02:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I presume you aren't referring to this:

from types import MethodType

> There really isn't anything else to say about it

How about starting with why you want this and what you will do with it?

According to this post on StackOverflow:

    The name instancemethod looks a lot like a bound method 
    object, but it turns out it's something else entirely. 
    It's a weird internal thing that, according to its 
    documentation, is supposed to be the new way for C types
    to represent their methods, except that the standard 
    C-level API for creating a type doesn't actually use it.

    According to conversations on the Python issue tracker,
    this feature was requested by the developers of Cython
    and Pyrex.

Given that this is not used anywhere in CPython, the documentation for the C API specifically says it is not exposed to Python code, and the name is painfully misleading, we should assume that it is undocumented for a reason. It might help to persuade the core devs to expose it as part of the public Python API if you have a use-case for this.

(And if so, I think it desperately needs to change the displayed name away from "instancemethod", since that's not what it returns.)

See also #28842
Date User Action Args
2019-02-08 12:02:40steven.dapranosetrecipients: + steven.daprano, ronaldoussoren, bup
2019-02-08 12:02:39steven.dapranosetmessageid: <>
2019-02-08 12:02:39steven.dapranolinkissue35937 messages
2019-02-08 12:02:39steven.dapranocreate