[Python-ideas] Boolean parameters guidelines

Barry Warsaw barry at python.org
Mon May 9 15:34:09 EDT 2016


On May 08, 2016, at 12:41 AM, Serhiy Storchaka wrote:

>1. It is preferable to pass boolean arguments as keyword arguments (if this
>is not the only argument).

Even if it is!

>2. It is preferable to declare boolean parameters as keyword-only parameters.

Yes, unless the code needs to be bilingual.

Cheers,
-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160509/dab0d48a/attachment.sig>


More information about the Python-ideas mailing list