]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
dataclasses: Avoid using private class (#124465)
authorJelle Zijlstra <jelle.zijlstra@gmail.com>
Tue, 24 Sep 2024 21:02:18 +0000 (14:02 -0700)
committerGitHub <noreply@github.com>
Tue, 24 Sep 2024 21:02:18 +0000 (14:02 -0700)
commit950fab46ad3a1960aa289d2d1de55447b88e25d7
tree5656626c045aa4b4c217b2fc4c7f356afd5943f3
parent5a605660745d32a9b9f4208666889c702527208c
dataclasses: Avoid using private class (#124465)

typing.get_origin() does what we need here, without reaching into
typing internals. This shouldn't change any behavior (so I am going
to skip news), but it sets a good example for other users introspecting
typing objects.
Lib/dataclasses.py