[Python-ideas] Keyword/Symbol literals

Alexander Belopolsky alexander.belopolsky at gmail.com
Wed Jan 21 20:18:04 CET 2015


On Wed, Jan 21, 2015 at 2:11 PM, Alexander Belopolsky <
alexander.belopolsky at gmail.com> wrote:

> Wouldn't it be possible to simply have
>
> def Symbol(str):
>

Hmm, I should have tested the code before posting.  That should have been a
class and the logic would not work without modifying sys.intern first, but
it does not kill the idea.  Why can't we make interned strings a subclass
of strings like bool is a subclass of int?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150121/fd8ba8a2/attachment-0001.html>


More information about the Python-ideas mailing list