]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-33100: Dataclasses now handles __slots__ and default values correctly. (GH-6152...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 20 Mar 2018 01:31:22 +0000 (18:31 -0700)
committerEric V. Smith <ericvsmith@users.noreply.github.com>
Tue, 20 Mar 2018 01:31:22 +0000 (21:31 -0400)
commit3d41f482594b6aab12a316202b3c06757262109a
treeb9b236f91d47ccb415e1e6d281fe8dc028126f34
parent45648312e540cda3b10109b6a808cbf6955c84eb
bpo-33100: Dataclasses now handles __slots__ and default values correctly. (GH-6152) (GH-6153)

If the class has a member that's a MemberDescriptorType, it's not a default value, it's from that member being in __slots__.
(cherry picked from commit 7389fd935c95b4b6f094312294e703ee0de18719)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
Lib/dataclasses.py
Lib/test/test_dataclasses.py
Misc/NEWS.d/next/Library/2018-03-19-20-47-00.bpo-33100.chyIO4.rst [new file with mode: 0644]