[issue44524] __name__ attribute in typing module
Ken Jin
report at bugs.python.org
Thu Aug 5 06:58:22 EDT 2021
Ken Jin <kenjin4096 at gmail.com> added the comment:
@Bas van Beek, thanks for testing numpy on 3.10rc1 and sending that link over. I was confused about what your original question entailed. The link provided much more context :). Seems that __name__ = None unintentionally breaks things that use annotations to generate docstrings.
> I don't recall ever seeing a non-string name before, so I'd argue that this is a bug.
Yes.
> Whether we should have this feature is a distinct "problem" from its `__name__` being `None`
If we properly set __name__ for all typing special forms, it won't have this problem anymore right? So we can kill two birds with one stone :).
> I'd like to submit a PR.
Please do! I'm re-opening this issue. Thanks for informing us.
----------
priority: normal -> high
resolution: fixed ->
status: closed -> open
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44524>
_______________________________________
More information about the Python-bugs-list
mailing list