A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-January/097225.html below:

[Python-Dev] Improve open() to support reading file starting with an unicode BOM

[Python-Dev] Improve open() to support reading file starting with an unicode BOM [Python-Dev] Improve open() to support reading file starting with an unicode BOM"Martin v. Löwis" martin at v.loewis.de
Mon Jan 11 18:59:08 CET 2010
> I must say that I find this whole thing pretty obvious. 'BOM' is not
> an encoding.

That I certainly agree with.

> That covers all usecases, is easy and obvious. Either open(file=foo,
> encoding=None) or open(file, encoding=encoding_from_bom(file))
> 
> I can't see that open(file, encoding='BOM') has any benefit over this,

Well, it would have the advantage that Walter pointed out: you can
implement it independent of the open() implementation, and even provide
it in older versions of Python.

Regards,
Martin


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4