Python Gotcha's?

Dan Sommers dan at tombstonezero.net
Thu Apr 5 21:54:30 EDT 2012


On 06 Apr 2012 01:03:45 GMT
Steven D'Aprano <steve+comp.lang.python at pearwood.info> wrote:

> This is the 21st century, not 1960 ...

Now there's a slippery slope, indeed.  ;-)

> ... and if the language designer is worried about the trivially small
> extra effort of parsing ' as well as " then he's almost certainly
> putting his efforts in the wrong place.

What about “ and ”, or ‘ and ’, or « and »?

Any unicode-aware parser should be able to determine that the next input
character is "punctuation, open" or "punctuation, initial" (and doesn't
already mean something else in the language) and then scan for the a
corresponding "punctuation, close" or "punctuation, final" character.

Dan



More information about the Python-list mailing list