A problem for your consideration:
We are given a tuple of delimiter string pairs to quote or comment text,
possibly over multiple lines. Something like this:
delims = (('"', '"'), ("'", "'"), ('#', '\n'), ("\*", "*\), ('\\', '\n')
...)
These may be nested.
Here's the problem: Determine is the string S appears *outside* or *inside*
any such quotation.
I know lots of ugly/complicated/heavyweight ways to solve this, but I'm
wondering if any of you geniuses have a pythonic/elegant/short algo that
solves this.
TIA,
----------------------------------------------------------------------------
Tim Daneliuk [email protected]
PGP Key: http://www.tundraware.com/PGP/
--
https://mail.python.org/mailman/listinfo/python-list