On 25 January 2014 17:44, Nick Coghlan <ncoghlan at gmail.com> wrote: > On 25 January 2014 01:07, Larry Hastings <larry at hastings.org> wrote: >> c) Functions that accept an 'int' when they mean 'boolean' (aka the >> "ints instead of bools" problem) >> >> Solution: >> 1) Use "bool". >> 2) Use "int", and I'll go relax Argument Clinic so they >> can use bool values as defaults for int parameters. > > If the temptation is to use True or False as the default, then I think > that's a clear argument that these should be accepting "bool". > However, expanding the accepted types is also clearly a new feature > that would need a "versionchanged" in the docs for all affected > functions, so I think these changes also belong in the "conversion > implies semantic changes, so leave until 3.5" category. I changed my mind (slightly) on this one. For 3.4, we can go with converting the current semantics (i.e. using "i"), and tweaking argument clinic to all bool defaults for integers. That allows the introspection to be added sensibly, without changing the semantics of the interface. Cheers, Nick. -- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4