When is PEP necessary?

D

Disc Magnet

Is PEP necessary to add a new package to the standard library?

What if the community just wants to add a new module to an existing package?

What if only a new function has to be added to a module in the standard library?

What if only a line or two are to be added to a function in the
standard library?
 
S

Steven D'Aprano

Is PEP necessary to add a new package to the standard library?

See http://www.python.org/dev/peps/pep-0001/

What if the community just wants to add a new module to an existing
package?

"Just"? Adding a new module is a big step.

How do you know the community wants to add a new module, without a PEP?
The purpose of the PEP is to demonstrate that the community wants the new
module, and to ensure that there will be people available to maintain
that module once it is added.

http://www.python.org/dev/peps/pep-0002/

What if only a new function has to be added to a module in the standard
library?

What if only a line or two are to be added to a function in the standard
library?

Trivial changes do not require a PEP.

There is a procedure which is supposed to be followed for backwards-
incompatible changes (described in a PEP, naturally), but for new
features, generally the package maintainer is free to add them without a
PEP.
 
M

Martin v. Loewis

Am 23.04.2011 14:16, schrieb Disc Magnet:
Is PEP necessary to add a new package to the standard library?

A PEP is necessary if the proposed change is contentious. If there is
widespread agreement that the change is desirable, no PEP is needed.
What if the community just wants to add a new module to an existing package?

It depends on many questions: how does the author of the module think
about that addition? If he vetoes it (for example), it doesn't matter
what the community wants. Also, who is going to maintain it? Are there
competing libraries that provide the same feature? etc.
What if only a new function has to be added to a module in the standard library?

Likewise. Propose to contribute it, and see what happens.
What if only a line or two are to be added to a function in the
standard library?

See above. It depends on the two lines. For example, changing the
default source encoding to UTF-8 was a fairly small change, yet
given past discussions, I felt that writing PEP 3120 was necessary.

Regards,
Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
474,162
Messages
2,570,893
Members
47,432
Latest member
GTRNorbert

Latest Threads

Top