[Python-Dev] PEP 423 : naming conventions and recipes related to packaging (original) (raw)

Benoît Bryon benoit at marmelune.net
Thu Jun 28 12:36:21 CEST 2012


Le 27/06/2012 13:34, Antoine Pitrou a écrit :

Similarly, I think the section about private projects ("Private (including closed-source) projects use a namespace") should be removed. It is not our duty to promote naming standards for private (i.e. internal) projects. The intention in the proposed PEP is to promote standards for general Python usage, which implicitely includes both public and private use.

The proposed PEP tries to explain how the conventions apply in most use cases. Public and private scopes are mentioned explicitely because they were identified as valuable use cases.

Here are some reasons why the "private code" use case has been identified as valuable:

That said, would the changes below improve the document?

Another option would have been to deal with "general Python code" and don't mention "public" and "private" areas, i.e. implicitely cover both. I haven't followed this way because it is implicit.

Also, I don't see what's so important about using your company's name as a top-level namespace. You don't need it for conflict avoidance: you can just as well use distinctive project names.

Using company's name as top-level namespace has been proven a good practice:

Using company's name is not the only option. But, as far as I know, it fits most use cases, which is enough (and required) for a convention.

Another option is to use any arbitrary name as top-level namespace. You can. If an arbitrary name seems obvious to you, feel free to use it. But, in most cases, company's name is an obvious choice.

So, would you appreciate a change so that:

Could be something in:

  1. "For private projects, use company name (or any unique arbitrary name) as top-level namespace".

  2. "For private projects, use any arbitrary name (company name is generally a good choice) as top-level namespace".

  3. "For private projects, use a top-level namespace (company name is generally a good choice, but you can use any unique arbitrary name)."

Benoit



More information about the Python-Dev mailing list