On 2016-10-25 20:14, Peter Otten wrote: > Tim Chase wrote: > > I like the clarity of using the "\N{...}" notation when creating > > string literals involving Unicode chars. > > > > Is there a built-in way to get such strings back from Python? > > >>> 'maƱana'.encode("ascii", "namereplace").decode() > 'ma\\N{LATIN SMALL LETTER N WITH TILDE}ana'
Wonderful! Thanks for knowing about that corner of Python and sharing it. > (requires Python 3.5) Sorry it wasn't back-ported, but glad it's there now. Thanks! -tkc -- https://mail.python.org/mailman/listinfo/python-list