[Python-ideas] .pyu nicode syntax symbols (was Re: Empty set, Empty dict)
Chris Angelico
rosuav at gmail.com
Tue Jul 1 11:07:28 CEST 2014
On Tue, Jul 1, 2014 at 7:00 PM, Andrew Barnert
<abarnert at yahoo.com.dmarc.invalid> wrote:
> src = src.replace('∅', '_EMPTY_SET_LITERAL')
Note that this suffers from a flaw that my POC script also suffers
from: it replaces this character *anywhere*, rather than only when
it's being used as a symbol on its own. Even inside a literal string.
It might be necessary to replace it back the other way afterward,
somehow, but I'm not sure if that would work.
ChrisA
More information about the Python-ideas
mailing list