PEP 8: Byte Order Mark (BOM) vs coding cookie

twyk vbp6ynr02 at sneakemail.com
Sun Aug 24 10:28:53 EDT 2008


PEP 8 says ...

Files using ASCII (or UTF-8, for Python 3.0) should not have a coding
cookie.

What about a BOM (Byte Order Mark)?  Per Wikipedia ...

http://en.wikipedia.org/wiki/Byte-order_mark#endnote_UTF-8)

'In UTF-8, this is not really a "byte order" mark. It identifies the
text as UTF-8 but doesn't say anything about the byte order, because
UTF-8 does not have byte order issues.'

So is it good style to omit the BOM in UTF-8 for Python 3.0?



More information about the Python-list mailing list