STINNER Victor <victor.stin...@haypocalc.com> added the comment:

New version of the patch which is shorter, cleaner, fix the last bug (seek) and 
don't change the default behaviour anymore (checking for BOM is now explicit):
 * BOM checking is now optional (explicit): use open(filename, encoding="BOM"). 
open(filename, "w", encoding="BOM") raises a ValueError.
 * Create a BOMS dictionary directly in the codecs module
 * Fix TextIOWrapper for seek(0) (add _has_bom attribute)
 * Add an unit test for read() and readlines()
 * Read the encoding property before the first read gives None

I also removed the _get_encoding() method (hack).

----------
Added file: http://bugs.python.org/file15786/open_bom-3.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7651>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to