This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients benjamin.peterson, brett.cannon, gvanrossum, ncoghlan, serhiy.storchaka, vstinner, yselivanov
Date 2018-02-21.11:08:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1519211323.09.0.467229070634.issue32892@psf.upfronthosting.co.za>
In-reply-to
Content
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().
History
Date User Action Args
2018-02-21 11:08:43serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum, brett.cannon, ncoghlan, vstinner, benjamin.peterson, yselivanov
2018-02-21 11:08:43serhiy.storchakasetmessageid: <1519211323.09.0.467229070634.issue32892@psf.upfronthosting.co.za>
2018-02-21 11:08:43serhiy.storchakalinkissue32892 messages
2018-02-21 11:08:43serhiy.storchakacreate