[Python-Dev] [Python-checkins] cpython (3.2): Avoid codec spelling issues by just using the utf-8 default.

Benjamin Peterson benjamin at python.org
Thu May 5 20:41:50 CEST 2011


2011/5/5 raymond.hettinger <python-checkins at python.org>:
> http://hg.python.org/cpython/rev/1a56775c6e54
> changeset:   69857:1a56775c6e54
> branch:      3.2
> parent:      69855:97a4855202b8
> user:        Raymond Hettinger <python at rcn.com>
> date:        Thu May 05 11:35:50 2011 -0700
> summary:
>  Avoid codec spelling issues by just using the utf-8 default.

Out of curiosity, what is the issue?
>
> files:
>  Lib/random.py |  2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
>
> diff --git a/Lib/random.py b/Lib/random.py
> --- a/Lib/random.py
> +++ b/Lib/random.py
> @@ -114,7 +114,7 @@
>         if version == 2:
>             if isinstance(a, (str, bytes, bytearray)):
>                 if isinstance(a, str):
> -                    a = a.encode("utf8")
> +                    a = a.encode()


-- 
Regards,
Benjamin


More information about the Python-Dev mailing list