Python Gotcha's?

Chris Angelico rosuav at gmail.com
Thu Apr 19 08:49:18 EDT 2012


On Thu, Apr 19, 2012 at 11:11 PM, Albert van der Horst
<albert at spenarnc.xs4all.nl> wrote:
> I still think the doubling convention of Algol68 is superior:
> """Help me Obiwan,"" she said, ""You're my only hope!"""
>
> No special treatment of any other symbol than the quote itself.
> A quoting symbol is such a devious syntactic element that I rather
> not have two ( " ' ) or even three ( " ' \ )

Trouble with that is the forest of backslashes that you get with
non-raw strings containing regular expressions that look for Windows
paths. One backslash in the path becomes two in the regexp and four in
the string.

ChrisA



More information about the Python-list mailing list