Commit c65bc875 authored by Stefan Behnel's avatar Stefan Behnel

reformat code

parent a7c82988
......@@ -217,12 +217,14 @@ def detect_opened_file_encoding(f):
normalise_newlines = re.compile(u'\r\n?|\n').sub
class NormalisedNewlineStream(object):
"""The codecs module doesn't provide universal newline support.
This class is used as a stream wrapper that provides this
functionality. The new 'io' in Py2.6+/3.x supports this out of the
box.
"""
def __init__(self, stream):
# let's assume .read() doesn't change
self.stream = stream
......@@ -254,6 +256,7 @@ class NormalisedNewlineStream(object):
else:
raise NotImplementedError
io = None
if sys.version_info >= (2,6):
try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment