[issue11175] allow argparse FileType to accept encoding and errors arguments

Lucas Maystre report at bugs.python.org
Tue Oct 23 14:06:15 CEST 2012


Lucas Maystre added the comment:

Here's an attempt at implementing this (my first contribution). Some notes:

- I tried to keep `__repr__()` backwards compatible. It would have been easier to inherit from `_AttributeHolder`, but maybe this might break some things...
- I added some test cases for `__repr__()`, but that's it. I don't think there's any other sensible test to do, as we're really just passing stuff to `open()`
- not sure about the style, especially line breaks...

----------
keywords: +patch
nosy: +lum
Added file: http://bugs.python.org/file27674/filetype11175.patch

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


More information about the Python-bugs-list mailing list