On Mon, May 4, 2015 at 2:46 AM, Chris Warrick wrote:
> Python 3.0–3.2 do not support the u'' notation for Unicode strings, it
> was restored in Python 3.3 to make it easier to write code compatible
> with 2.x and 3.x
Whoever restored this forgot about raw literals:
>>> ur'abc'
File "",
> On May 4, 2015 2:17 AM, "anupama srinivas murthy" <
> anupama.2312.bm...@gmail.com> wrote:
>
>> 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"""\
Peter Otten wrote:
> anupama srinivas murthy wrote:
>
>> 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))
>>
anupama srinivas murthy wrote:
> 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 =
On Mon, May 4, 2015 at 7:03 AM, anupama srinivas murthy
wrote:
> 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':
A better comparison to use would be
if sys.version_info[0] == 2:
It’s the stand
On 04/05/15 06:03, anupama srinivas murthy wrote:
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:
diction
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 co