[Python-checkins] distutils2: pep8 compat.py
eric.araujo
python-checkins at python.org
Wed Sep 21 16:35:45 CEST 2011
http://hg.python.org/distutils2/rev/5434147ae874
changeset: 1184:5434147ae874
user: Éric Araujo <merwok at netwok.org>
date: Wed Sep 21 16:31:52 2011 +0200
summary:
pep8 compat.py
files:
distutils2/compat.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/distutils2/compat.py b/distutils2/compat.py
--- a/distutils2/compat.py
+++ b/distutils2/compat.py
@@ -74,6 +74,7 @@
_cookie_re = re.compile("coding[:=]\s*([-\w.]+)")
+
def _get_normal_name(orig_enc):
"""Imitates get_normal_name in tokenizer.c."""
# Only care about the first 12 characters.
@@ -85,6 +86,7 @@
return "iso-8859-1"
return orig_enc
+
def detect_encoding(readline):
"""
The detect_encoding() function is used to detect the encoding that should
@@ -105,6 +107,7 @@
bom_found = False
encoding = None
default = 'utf-8'
+
def read_or_stop():
try:
return readline()
@@ -168,7 +171,8 @@
elif isinstance(filename, unicode):
return filename.encode(sys.getfilesystemencoding())
else:
- raise TypeError("expect bytes or str, not %s" % type(filename).__name__)
+ raise TypeError("expect bytes or str, not %s" %
+ type(filename).__name__)
try:
--
Repository URL: http://hg.python.org/distutils2
More information about the Python-checkins
mailing list