Skip to content

Improve builtins.vars() - #9146

Merged
srittau merged 2 commits into
mainfrom
AlexWaygood-vars
Nov 10, 2022
Merged

srittau merged 2 commits into
mainfrom
AlexWaygood-vars

Conversation

@AlexWaygood

Copy link
Copy Markdown
Member
>>> class Foo: ...
...
>>> vars(Foo)
mappingproxy({'__module__': '__main__', '__dict__': <attribute '__dict__' of 'Foo' objects>, '__weakref__': <attribute '__weakref__' of 'Foo' objects>, '__doc__': None})

```pycon
>>> class Foo: ...
...
>>> vars(Foo)
mappingproxy({'__module__': '__main__', '__dict__': <attribute '__dict__' of 'Foo' objects>, '__weakref__': <attribute '__weakref__' of 'Foo' objects>, '__doc__': None})
```
Comment thread stdlib/builtins.pyi Outdated
@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@AlexWaygood
AlexWaygood marked this pull request as ready for review November 10, 2022 11:01
@srittau
srittau merged commit 068b0b4 into main Nov 10, 2022
@srittau
srittau deleted the AlexWaygood-vars branch November 10, 2022 11:14
JelleZijlstra pushed a commit to python/mypy that referenced this pull request Mar 8, 2023
The `stubtest.py` cast is no longer needed -- I think the mypyc issue
was fixed by python/typeshed#9146.

The `types.py` casts were never needed. They were added relatively
recently by somebody called "Alex Waygood".
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