Re: Cost of "unicode(s)" where s is Unicode

2008-01-06 Thread Aahz
In article <[EMAIL PROTECTED]>, JKPeck <[EMAIL PROTECTED]> wrote: > u = u"abc" uu = unicode(u) u is uu >True s = "abc" ss = unicode(s) s is ss >False You uuencode Unicode? -- Aahz ([EMAIL PROTECTED]) <*> http://www.pythoncraft.com/ Sorry, couldn't

Re: Cost of "unicode(s)" where s is Unicode

2008-01-06 Thread JKPeck
On Jan 6, 9:06 am, John Nagle <[EMAIL PROTECTED]> wrote: >Does > > text = unicode(text) > > make a copy of a Unicode string, or is that essentially a > free operation if the input is already Unicode? > > John Nagle >>> u = u"abc" >>> uu = unicode(u) >>>

Re: Cost of "unicode(s)" where s is Unicode

2008-01-06 Thread Christian Heimes
John Nagle wrote: >Does > > text = unicode(text) > > make a copy of a Unicode string, or is that essentially a > free operation if the input is already Unicode? >>> u = u"some long unicode object" >>> unicode(u) is u True -- http://mail.python.org/mailman/listinfo/python-list

Re: Cost of "unicode(s)" where s is Unicode

2008-01-06 Thread Rob Williscroft
John Nagle wrote in news:[EMAIL PROTECTED] in comp.lang.python: >Does > > text = unicode(text) > > make a copy of a Unicode string, or is that essentially a > free operation if the input is already Unicode? > > John Nagle > http://docs.python.org/lib/built-in-fun

Cost of "unicode(s)" where s is Unicode

2008-01-06 Thread John Nagle
Does text = unicode(text) make a copy of a Unicode string, or is that essentially a free operation if the input is already Unicode? John Nagle -- http://mail.python.org/mailman/listinfo/python-list