Need some Python 3 help

Bryan bryanjugglercryptographer at yahoo.com
Tue May 25 22:46:37 EDT 2010


Paul McGuire wrote:
> Hrmm, I had a sneaking hunch this might be the issue.  But then I
> don't know how this code *ever* worked in Python 3, as it is chock
> full of indexed references into the string being parsed.  And yet,
> I've had other folks test and confirm that pyparsing_py3 *does* work
> on Python 3.  It is a puzzle.

I suspect in most cases you use bytes consistently. You got the
exception from:

  instring[loc] in wt

If instring and wt are both bytes, that's fine. If they're both str,
also fine. If one is bytes and one is str, exception.


--
--Bryan



More information about the Python-list mailing list