Author Greg Kuhn
Recipients Greg Kuhn
Date 2019-03-29.11:52:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I have a snippet below which runs fine on python 3.7.0 but raises a ValueError exception on 3.7.1. I believe it's related to

The error: c:\python\lib\ ValueError

The script:

from dataclasses import replace, dataclass, InitVar

class Test:
    a:int = 1
    b:InitVar[int] = None

    def __post_init__(self, b):
        if b is not None:
            self.a = b

if __name__ == '__main__':
    t = Test()
    t1 = Test(b=5)
    assert t1.a == 5

    t2 = replace(t1, **{})
Date User Action Args
2019-03-29 11:52:18Greg Kuhnsetrecipients: + Greg Kuhn
2019-03-29 11:52:18Greg Kuhnsetmessageid: <>
2019-03-29 11:52:18Greg Kuhnlinkissue36470 messages
2019-03-29 11:52:18Greg Kuhncreate