-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
types.MappingProxyType.__qualname__
isn't correct
#106165
Comments
First, you have the wrong expectation about
The difference between
The module is stored only in the But that doesn't answer the second part of your complaint, which is that However, more recently added objects in the
It would be nice for consistency if other types that are currently in the This affects several other types, not just
|
Yes, sorry for the half-sloppy original post, seems like you've understood what I was getting at though. On my end, I am doing deserialization like this: def extract_fully_qualified_name(cls: type) -> str:
if cls.__module__ == "builtins":
return cls.__qualname__
return f"{cls.__module__}.{cls.__qualname__}" And
I agree with your opinion on fixing the multiple nonstandard members of |
FunctionType = type(_f)
LambdaType = type(lambda: None) # Same as FunctionType
CodeType = type(_f.__code__)
MappingProxyType = type(type.__dict__)
SimpleNamespace = type(sys.implementation) They are just variables. Variables don't deserve their own Changing the "-1" on the change. |
@sunmy2019 regardless of how they are created, these are the canonical names at which these types are exposed. However, closing this as a duplicate of #100129. |
Bug report
Your environment
The text was updated successfully, but these errors were encountered: