Quotation Ugliness

Tim Daneliuk tundra at tundraware.com
Tue Nov 25 20:20:57 EST 2014


On 11/25/2014 06:44 PM, Chris Angelico wrote:
> You may have issues with your definition of nesting, though. For
> instance, what's it mean if you have double-quotes, then a hash?

It means that the hash is quoted as part of the literal string.

> then the only nesting you need worry about is /* and */,

Agreed

> hen you find any opener, you seek its
corresponding closer, and then special-case /* to count any additional
/* and look for a */ for each one */ .

That's more or less where I was headed.  I just wanted something less
brute force :)

-- 
----------------------------------------------------------------------------
Tim Daneliuk     tundra at tundraware.com
PGP Key:         http://www.tundraware.com/PGP/




More information about the Python-list mailing list