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

Set qualname. #11

Open
wants to merge 2 commits into
base: co_annotations
Choose a base branch
from
Open

Conversation

methane
Copy link

@methane methane commented Apr 20, 2021

>>> from __future__ import co_annotations
>>> def foo(a:int, b:str) -> None: pass
...
>>> f = foo.__co_annotations__
>>> f
<function foo.__co_annotations__ at 0x7f87a834c940>
>>> f.__name__
'__co_annotations__'
>>> f.__qualname__
'foo.__co_annotations__'

@larryhastings
Copy link
Owner

This looks pretty good. But I want to double-check and make sure I understand what names function objects and code objects want to be.

Also, it seems PEP 649 is on pause right now, until after Python 3.10 hits beta. I suspect it'll be a couple months before the Python Steering Committee makes a final decision on the PEP. So, I hope it's okay with you if I just leave this open and unmerged for now.

@larryhastings
Copy link
Owner

If PEP 649 is accepted, I'll act on this PR, how about that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants