[Python-Dev] PEP 366 is unclear about what it specifies

"Martin v. Löwis" martin at v.loewis.de
Wed Aug 8 00:25:36 CEST 2012


> Honestly, updating the PEPs constantly is a pain.

Please understand that Stefan's request is not about updating the PEP
in order to match the current implementation - I agree that this is a
pain, and should not be done. Consequentially, relying on the PEPs
to understand what CPython does is also flawed.

However, what Stefan requests is that the PEP be changed to say what
really is the minimum requirement for acceptance - that the PEP actually
says what the proposed change is. What it currently does say is
the "change is the introduction of a new module level attribute, 
__package__". It nowhere says what value this attribute will have;
setting it to math.PI would be conforming, but clearly not intended.
The only occurrence of the word "string" is the sentence
"Note that setting __package__ to the empty string explicitly is 
permitted". So we know at least one possible value of the attribute:
the empty string - but that still clearly isn't the intention of the
PEP.

Of course, it's up to the PEP author to make a change, and perhaps
(to some degree) to non-author committers (who all can take the
role of a PEP editor, acknowledging that the proposed change
is editorial).

FWIW, the documentation (simple_stmts.rst) says that __package__
(if present) is "the name of package that contains the module or
package".

Regards,
Martin


More information about the Python-Dev mailing list