Ah, I
understand now. Thank you everyone for your help.
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
Pb2Au wrote:
> On Sun, Nov 16, 2008 at 4:31 PM, Chris Rebert <[EMAIL PROTECTED]>: wrote:
>>
>>Already exists. Has for quite a while now:
>>
>>the_unicode = unicode(some_bytes, "name of encoding")
>
> I know that it had worked in the version 2.5, Python 3.0 rc2 doesn't
> seem to recognize it as a fu
Ah, my bad. Should never have referred to the Python 2.6 docs. :)
Replace "unicode" with "str" in my line of code and I think it should work.
Cheers,
Chris
On Sun, Nov 16, 2008 at 12:13 PM, Pb2Au <[EMAIL PROTECTED]> wrote:
> On Sun, Nov 16, 2008 at 4:31 PM, Chris Rebert <[EMAIL PROTECTED]>: wrot
> I know that it had worked in the version 2.5, Python 3.0 rc2 doesn't
> seem to recognize it as a function.
a) I discourage usage of unicode and str converters; consider using
.encode/.decode instead
b) unicode is now called str
Regards,
Martin
___
On Sun, Nov 16, 2008 at 4:31 PM,
Chris Rebert <[EMAIL PROTECTED]>: wrote:
>> Hello,
>>
>> I recently changed from Python 2.5 to Python 3.0 rc2, and have
>> been trying to find out how to convert byte
strings (b"example")
>> to unicode strings ("example"). I noticed that some of these
had
>> change
On Sat, Nov 15, 2008 at 8:46 AM, Pb2Au <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I recently changed from Python 2.5 to Python 3.0 rc2, and have
> been trying to find out how to convert byte strings (b"example")
> to unicode strings ("example"). I noticed that some of these had
> changed in the lates
Hello,
I recently changed from Python 2.5 to Python 3.0 rc2, and have
been trying to find out how to convert byte strings (b"example")
to unicode strings ("example"). I noticed that some of these had
changed in the latest version.
One reason for a conversion between the two is the
urllib.request