[Python-ideas] Boolean parameters guidelines
Guido van Rossum
guido at python.org
Tue May 10 12:02:30 EDT 2016
On Tue, May 10, 2016 at 6:29 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> On 10 May 2016 at 07:57, M.-A. Lemburg <mal at egenix.com> wrote:
> > This looks more like an API design question than a coding
> > style one.
> This is actually a good point - at the moment, PEP 8 is a mix of
> coding style guidelines (i.e. how we use existing APIs) and API design
> guidelines (especially the parts on naming conventions and defining
> what is and isn't a public API).
> For code reviews, we want the former, but for PEP discussions we want
> the latter. Perhaps it would make sense to give API design guidelines
> a dedicated home in the developer guide, rather than overloading PEP 8
> with them?
That seems a short-sighted approach to code reviews. At least where I work,
early code review cycles are a great place for API design critique.
I do agree that most API design guidelines are too complex to state
categorically in a style PEP. The discussion and misunderstanding about the
simple rule for boolean parameters is an example of how subtle the
distinctions are. So API design is more a subject for blogs and books than
for a PEP.
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas