[Python-Dev] Re: [Python-checkins] python/dist/src/Doc/lib libfuncs.tex,1.134,1.135 (original) (raw)
Raymond Hettinger python@rcn.com
Wed, 11 Jun 2003 04:47:06 -0400
- Previous message: [Python-Dev] Re: [Python-checkins] python/dist/src/Doc/lib libfuncs.tex,1.134,1.135
- Next message: [Python-Dev] Default constructor values (Re: [Python-checkins] python/dist/src/Doc/lib libfuncs.tex,1.134,1.135)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> * Indicate that arguments are optional for most builtin type constructors. > ... > ! \begin{funcdesc}{bool}{\optional{x}}
This sounds weird: * Why should object constructors have an optional argument without a default value ? Why aren't these default values documented ? * This "feature" sounds like it will hide programming errors. * What is the purpose of the "feature" ?
I'm not following whether you don't like the implementation or documentation. My patch just documents the existing implementation.
The implementation has been in for a while (GvR checked in Alex's patch for www.python.org/sf/724135 ). The news item reads:
- bool() called without arguments now returns False rather than raising an exception. This is consistent with calling the constructors for the other builtin types -- called without argument they all return the false value of that type. (SF patch #724135)
Raymond Hettinger