Peter Otten <[EMAIL PROTECTED]> writes:
[...]
>> Forgive me if this is a stupid question, but: What purpose does
>> function f serve?
>
> Like the OP's get_inventary_number() it takes a unicode string and
> returns a tuple of unicode strings. I'ts pointless otherwise. I hoped I
> had stripped down
John J. Lee wrote:
> Peter Otten <[EMAIL PROTECTED]> writes:
> [...]
>> # -*- coding: utf8 -*-
>> r"""
> f("äöü".decode("utf8"))
>> (u'\xe4\xf6\xfc',)
>> """
>> def f(s):
>> return (s,)
>
> Forgive me if this is a stupid question, but: What purpose does
> function f serve?
Like the OP's
J. Cliff Dyer wrote:
> John J. Lee wrote:
>
>> Peter Otten <[EMAIL PROTECTED]> writes:
>> [...]
>>
>>
>>> def f(s):
>>> return (s,)
>>>
>>>
>> Forgive me if this is a stupid question, but: What purpose does
>> function f serve?
>>
>>
>> John
>>
>>
>
> Well, it has
John J. Lee wrote:
> Peter Otten <[EMAIL PROTECTED]> writes:
> [...]
>
>> def f(s):
>> return (s,)
>>
>
> Forgive me if this is a stupid question, but: What purpose does
> function f serve?
>
>
> John
>
Well, it has nothing to do with the unicode bit that came before it. It
just ta
Peter Otten <[EMAIL PROTECTED]> writes:
[...]
> # -*- coding: utf8 -*-
> r"""
f("äöü".decode("utf8"))
> (u'\xe4\xf6\xfc',)
> """
> def f(s):
> return (s,)
Forgive me if this is a stupid question, but: What purpose does
function f serve?
John
--
http://mail.python.org/mailman/listinfo/p
Bzyczek wrote:
> So my question is: Is it possible to run doctests with UTF-8
> characters? And if your answer will be YES, tell me please how...
Use raw strings in combination with explicit decoding and a little
try-and-error. E. g. this little gem passes ;)
# -*- coding: utf8 -*-
r"""
>>> f("ä