On 25 January 2014 19:20, Nick Coghlan <ncogh...@gmail.com> wrote: > On 25 January 2014 17:44, Nick Coghlan <ncogh...@gmail.com> wrote: >> On 25 January 2014 01:07, Larry Hastings <la...@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.
"allow bool defaults", rather. Cheers, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com