Message120661
| Author |
vstinner |
| Recipients |
belopolsky, eric.araujo, georg.brandl, pitrou, vstinner |
| Date |
2010年11月07日.09:04:46 |
| SpamBayes Score |
0.0004997469 |
| Marked as misclassified |
No |
| Message-id |
<201011070518.28941.victor.stinner@haypocalc.com> |
| In-reply-to |
<AANLkTinUMFiTi2kDGZsJXTtzof++04hERd+rUMU-n8v5@mail.gmail.com> |
| Content |
> 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>. |
|