[Python-ideas] Boolean parameters guidelines
chris.barker at noaa.gov
Mon May 9 13:57:58 EDT 2016
On Sun, May 8, 2016 at 6:08 AM, Eric V. Smith <eric at trueblade.com> wrote:
> Wouldn't that be "for every (or almost every) call-site"?
"most call sites" would be fine. The common use case matters, it's not that
hard to conditionally call a different function, as long as that's the
The other key here is that even if a boolean flag does essentially select
between two different function, there are times where there is more than
one such boolean flag for a single function, so you end up with 2**n
"different" functions -- in this case, probably better to just use the
flags and have one calling point.
Christopher Barker, Ph.D.
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas