UTF-8 characters in doctest

John J. Lee jjl at pobox.com
Thu Sep 20 15:27:51 EDT 2007


Peter Otten <__peter__ at web.de> 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



More information about the Python-list mailing list