[Python-ideas] Boolean parameters guidelines

Koos Zevenhoven k7hoven at gmail.com
Tue May 10 10:08:52 EDT 2016

On Tue, May 10, 2016 at 4:53 PM, Chris Angelico <rosuav at gmail.com> wrote:
> On Tue, May 10, 2016 at 11:48 PM, Steven D'Aprano <steve at pearwood.info> wrote:
>> (Personally, I think that coding style and API design overlap and that
>> it is pointless to try to separate them. Coding style isn't only how to
>> name your variables, but also includes whether you use map versus list
>> comprehensions, whether you raise exceptions or return error codes,
>> whether you write in a Java-influenced Design Pattern style or a
>> functional style, when to use bool arguments and when not to.)
> If the API design guidelines get broken out, they should be closely
> associated with PEP 8. Maybe call it PEP 18, and have some references
> in PEP 8? But I'd rather see it all as one cohesive document - advice
> on how to structure your code to be Pythonic and maintainable.

One advantage of "PEP 18" might be that many style issues don't affect
API design. And API design is more critical than style within the
implementation, because the former can be very difficult to improve
afterwards. And a shorter document may be easier to maintain in a
self-consistent manner and to understand by the reader.

-- Koos

> ChrisA
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/

More information about the Python-ideas mailing list