Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing type in "types" module #48351

Closed
AntoinedOtreppe mannequin opened this issue Oct 10, 2008 · 2 comments
Closed

Missing type in "types" module #48351

AntoinedOtreppe mannequin opened this issue Oct 10, 2008 · 2 comments
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@AntoinedOtreppe
Copy link
Mannequin

AntoinedOtreppe mannequin commented Oct 10, 2008

BPO 4101
Nosy @benjaminp

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2008-10-10.21:34:13.687>
created_at = <Date 2008-10-10.21:11:24.523>
labels = ['type-feature', 'library']
title = 'Missing type in "types" module'
updated_at = <Date 2008-10-10.21:34:13.678>
user = 'https://bugs.python.org/AntoinedOtreppe'

bugs.python.org fields:

activity = <Date 2008-10-10.21:34:13.678>
actor = 'benjamin.peterson'
assignee = 'none'
closed = True
closed_date = <Date 2008-10-10.21:34:13.687>
closer = 'benjamin.peterson'
components = ['Library (Lib)']
creation = <Date 2008-10-10.21:11:24.523>
creator = "Antoine d'Otreppe"
dependencies = []
files = []
hgrepos = []
issue_num = 4101
keywords = []
message_count = 2.0
messages = ['74643', '74647']
nosy_count = 2.0
nosy_names = ['benjamin.peterson', "Antoine d'Otreppe"]
pr_nums = []
priority = 'normal'
resolution = 'wont fix'
stage = None
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue4101'
versions = ['Python 2.5']

@AntoinedOtreppe
Copy link
Mannequin Author

AntoinedOtreppe mannequin commented Oct 10, 2008

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 ?

@AntoinedOtreppe AntoinedOtreppe mannequin added stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Oct 10, 2008
@benjaminp
Copy link
Contributor

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.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

1 participant