Author avanov
Recipients avanov
Date 2018-03-28.14:51:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1522248688.28.0.467229070634.issue33170@psf.upfronthosting.co.za>
In-reply-to
Content
From my understanding of the docs section on new types, https://docs.python.org/3/library/typing.html#newtype the new type based on 
 int() should just pass the value into the base constructor. However,

```
PercentDiscount = NewType('PercentDiscount', int)

>>> PercentDiscount(50) == int(50)
True

>>> int('50') == int(50)
True

>>> PercentDiscount('50') == PercentDiscount(50)
False
```
History
Date User Action Args
2018-03-28 14:51:28avanovsetrecipients: + avanov
2018-03-28 14:51:28avanovsetmessageid: <1522248688.28.0.467229070634.issue33170@psf.upfronthosting.co.za>
2018-03-28 14:51:28avanovlinkissue33170 messages
2018-03-28 14:51:28avanovcreate