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

> what about open(.., encoding="fromcookie")?

Please don't do that. It remembers me the magical str.encode() method of 
Python2. I prefer simple API with limited features: if you want to open a 
Python script, use tokenize.open(), if you want to open an XML document use 
any XML library, etc. It remembers me also the discussion about detecting BOM 
in text files: issue #7651. There was no consensus, and so the issue is still 
open.

For this particular issue, I prefer a specific function tokenize.<choose a 
function name>.

----------

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

Reply via email to