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 tun...@tundraware.com PGP Key: http://www.tundraware.com/PGP/ -- https://mail.python.org/mailman/listinfo/python-list