>>>>> akhil1988 <[email protected]> (a) wrote:
>a> ok!
>a> I got the indentation errors fixed. Bu I get another error:
>a> Traceback (most recent call last):
>a> File "./temp.py", line 484, in <module>
>a> main()
>a> File "./temp.py", line 476, in main
>a> line.decode('utf-8').strip()
>a> AttributeError: 'str' object has no attribute 'decode'
>a> I am using Python3.1
In Python 3 you can't decode strings because they are Unicode strings
and it doesn't make sense to decode a Unicode string. You can only
decode encoded things which are byte strings. So you are mixing up byte
strings and Unicode strings.
--
Piet van Oostrum <[email protected]>
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: [email protected]
--
http://mail.python.org/mailman/listinfo/python-list