Hello,

My python code needs to run on versions 2.7 to 3.4. To use stringio
function as appropriate, the code i use is;

if sys.version < '3':
            dictionary = io.StringIO(u"""\n""".join(english_words))
        else:
            dictionary = io.StringIO("""\n""".join(english_words))

The code runs fine on all versions mentioned above except for 3.2 where i
get the error:
dictionary = io.StringIO(u"""\n""".join(english_words))
                                    ^
SyntaxError: invalid syntax

How can I solve the issue?

Thank you
Anupama
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to