[pypy-commit] pypy py3k: Remove 'utf-8' argument from calls to str.encode() in this file because it's already the default argument.

mjacob noreply at buildbot.pypy.org
Tue Jun 9 19:06:07 CEST 2015


Author: Manuel Jacob <me at manueljacob.de>
Branch: py3k
Changeset: r77998:55d423041e00
Date: 2015-06-09 19:06 +0200
http://bitbucket.org/pypy/pypy/changeset/55d423041e00/

Log:	Remove 'utf-8' argument from calls to str.encode() in this file
	because it's already the default argument.

diff --git a/lib_pypy/_curses.py b/lib_pypy/_curses.py
--- a/lib_pypy/_curses.py
+++ b/lib_pypy/_curses.py
@@ -169,7 +169,7 @@
     if isinstance(text, bytes):
         return text
     elif isinstance(text, str):
-        return text.encode('utf-8')
+        return text.encode()
     else:
         raise TypeError("bytes or str expected, got a '%s' object"
                         % (type(text).__name__,))
@@ -809,7 +809,7 @@
     if term is None:
         term = ffi.NULL
     elif isinstance(term, str):
-        term = term.encode('utf-8')
+        term = term.encode()
     err = ffi.new("int *")
     if lib.setupterm(term, fd, err) == lib.ERR:
         err = err[0]


More information about the pypy-commit mailing list