RE: [Pyparsing] PyParsing and unicode
Brought to you by:
ptmcg
From: Paul M. <pa...@al...> - 2006-05-04 01:51:22
|
Jean-Paul, Here are my tests with the latest version: from pyparsing import quotedString,__version__ print __version__ def stripper(s, loc, toks): toks = toks.asList() toks[0] = toks[0][1:-1] return toks input = u"'foo'" print quotedString.parseString(input) quotedString.setParseAction(stripper) print quotedString.parseString(input) Prints: 1.4.3 [u"'foo'"] [u'foo'] Can you send me an example of how the behavior changes depending on usage? So far, it looks like the current release does the right thing. -- Paul |