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.

classification
Title: Missing type in "types" module
Type: enhancement Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: Antoine d'Otreppe, benjamin.peterson
Priority: normal Keywords:

Created on 2008-10-10 21:11 by Antoine d'Otreppe, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg74643 - (view) Author: Antoine d'Otreppe (Antoine d'Otreppe) Date: 2008-10-10 21:11
Hello

There's a type missing in the standard "types" modules (or I didn't find
it, in what case I apologize for this useless posting)

Consider this code:

---
WrapperDescriptorType = None

class Meta(type):
    def __init__(cls, *args, **kwargs):
        global WrapperDescriptorType
        type.__init__(cls, *args, **kwargs)
        WrapperDescriptorType = type(cls.__init__)

class A:
    __metaclass__ = Meta
---

I could not find WrapperDescriptorType in types module.

btw, I have to pass this descriptor to another function. But in fact I
don't need the wrapper but the real method. How to get it ?
msg74647 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-10-10 21:34
At the moment, we're not adding things to the type module because it may
eventually go away.

Since WrapperDescriptorType implements the descriptor protocol you can
get the __init__ method just by using it.
History
Date User Action Args
2022-04-11 14:56:40adminsetgithub: 48351
2008-10-10 21:34:13benjamin.petersonsetstatus: open -> closed
resolution: wont fix
messages: + msg74647
nosy: + benjamin.peterson
2008-10-10 21:11:24Antoine d'Otreppecreate