Message312490
Right, they shouldn't be just aliases, but Constant subclasses with __new__ which return Constant and __instancecheck__ which checks the type of the value. And the Constant class should have writable properties n and s. All these operations should emit a deprecation warning at runtime. Even this doesn't preserve perfect compatibility. issubclass(type(node), Num) will not work, and compile(Num('123')) will raise en exception in the Num constructor instead of compile(). |
|
| Date |
User |
Action |
Args |
| 2018-02-21 11:08:43 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, gvanrossum, brett.cannon, ncoghlan, vstinner, benjamin.peterson, yselivanov |
| 2018-02-21 11:08:43 | serhiy.storchaka | set | messageid: <[email protected]> |
| 2018-02-21 11:08:43 | serhiy.storchaka | link | issue32892 messages |
| 2018-02-21 11:08:43 | serhiy.storchaka | create | |
|