[issue14017] Make it easy to create a new TextIOWrapper based on an existing

Nick Coghlan report at bugs.python.org
Wed Feb 15 00:59:34 CET 2012


Nick Coghlan <ncoghlan at gmail.com> added the comment:

Updating issue title, since I realised this doesn't work in 3.2 either (the "newline" argument also isn't available for introspection - "newlines" is not the same thing)

Possible API signature:

    _missing = object()
    def rewrap(self, encoding=_missing, errors=_missing, newline=_missing, line_buffering=_missing, write_through=_missing):
        pass

That is, accept the same arguments as __init__ (excluding the buffer argument), with any arguments not explicitly supplied replaced with the values from the current instance.

----------
title: io.TextIOWrapper should expose a documented write_through attribute -> Make it easy to create a new TextIOWrapper based on an existing

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14017>
_______________________________________


More information about the Python-bugs-list mailing list