From 887891a6e17ceb7f3c4c1cd129b41c1d58f1019a Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Mon, 31 Dec 2018 06:49:58 -0800 Subject: Replace string literal + encode with bytes literal Simpler and more forward compatible. The b prefix syntax is available on all supported Pythons. --- unidecode/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'unidecode') diff --git a/unidecode/util.py b/unidecode/util.py index 477280d..4749a54 100644 --- a/unidecode/util.py +++ b/unidecode/util.py @@ -43,7 +43,7 @@ def main(): # add a newline to the string if it comes from the # command line so that the result is printed nicely # on the console. - stream += '\n'.encode('ascii') + stream += b'\n' else: if PY3: stream = sys.stdin.buffer.read() -- cgit v1.2.1