Message322628
As a user, I would find Mark's suggestion very confusing, accepting non-integral floats but not non-integral Decimals and Fractions.
I agree that ideally it should accept only integral inputs, including floats, but deprecating the behavior for non-integral floats has been deemed out of scope for this issue. Therefore I suggest doing the same for Decimal and Fraction: accept them but raise a ValueError if their values aren't non-negative integers.
At a later point we could deprecate this behavior for all non-integer types of numbers.
Another alternative, which is also more acceptable IMO, is to raise TypeError if given anything other than an int or a float, while deprecating floats altogether. |
|
Date |
User |
Action |
Args |
2018-07-29 11:08:59 | taleinat | set | recipients:
+ taleinat, tim.peters, rhettinger, terry.reedy, facundobatista, mark.dickinson, serhiy.storchaka, John.Yeung |
2018-07-29 11:08:59 | taleinat | set | messageid: <1532862539.4.0.56676864532.issue33083@psf.upfronthosting.co.za> |
2018-07-29 11:08:59 | taleinat | link | issue33083 messages |
2018-07-29 11:08:59 | taleinat | create | |
|