Re: the meaning of r’.......‘

John Roth johnroth1 at gmail.com
Tue Jul 24 02:50:04 CEST 2012


On Monday, July 23, 2012 1:59:42 AM UTC-6, Chris Angelico wrote:
> On Fri, Jul 20, 2012 at 5:56 PM, levi nie <levinie001 at gmail.com> wrote:
> > the meaning of r’.......‘?
> 
> It's a raw string.
> 
> http://docs.python.org/py3k/tutorial/introduction.html#strings
> 
> Chris Angelico

Since this seems to have wandered into the question of unicode support for operators and identifiers in Python, I'll add a few general comments. First, adding unicode operators has been discussed several times, and the answer has always been what several people have stated: lack of support from keyboards and fonts. As far as I can tell, the only significant issue that unicode operators would solve is set operators. Currently they overload the arithmetic operators, so it's not possible to have an object with both arithmetic and set behavior supported by operator syntax. I'm not sure how important that is in the real world.

Identifiers can have any character that's marked as alphabetic in the unicode data base. The doc gives the exact criteria, but it's driven by checking the actual data base, or rather Python's copy of it. PEP 8 requires sticking to the Ascii character set except for comments, and then only when it's needed for properly spelling someone's name. Of course, anyone can do anything they want, but Python doesn't have a culture of deliberately trying to write illegible code.

And yes, Python did have a problem with the Turkish "i". It got fixed without all the sturm and drang that seems to accompany PHP issues.






More information about the Python-list mailing list