[Pulp-list] Python Module Header

Nick Coghlan ncoghlan at redhat.com
Fri Oct 26 00:00:14 UTC 2012


On 10/26/2012 01:32 AM, Jason Connor wrote:
> +1 to the utf-8 coding header and the © symbol. Red Hat's default text file encoding is utf-8 and I think the header looks professional. I don't know why pep-8 says not to use a mechanism they provide, but this is on of the few times I disagree with it.

Something people often forget when they say "follow PEP 8" is that it's
primarily the style guide for the *CPython reference implementation*,
and only incidentally the foundation for a lot of other people's Python
style guides. For the standard library, the rule is "use the default
source encoding unless you have a really good reason not to" (which
really only affects the examples used in the test suite to ensure the
encoding cookie support is working correctly).

That doesn't mean that rule makes sense for everyone, and, indeed, we
think standardising on utf-8 as the source encoding is such a good idea
we made it the language default in 3.x ;)

Cheers,
Nick.

-- 
Nick Coghlan
Red Hat Infrastructure Engineering & Development, Brisbane

Python Applications Team Lead
Beaker Development Lead (http://beaker-project.org/)
GlobalSync Development Lead (http://pulpdist.readthedocs.org)




More information about the Pulp-list mailing list