UTF-8 characters in doctest

John J. Lee jjl at pobox.com
Thu Sep 20 21:27:51 CEST 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