On 15Mar2012 12:22, Ben Finney <ben+pyt...@benfinney.id.au> wrote: | Roy Smith <r...@panix.com> writes: | > I'll admit I hadn't considered that, but I don't see it as a major | > problem. The type intuition could be designed to only work for types | > other than NoneType. | | −1, then. It's growing too many special cases, and is no longer simple | to describe, so that indicates it's probably a bad idea.
If `type` is not supplied and `default` is present and not None, `type` shall be the type of `default`. That seems straightforward to me. It's a single sentence, easy to read and understand, and potentially saves a lot of code verbiage (gratuitous type= prarameters). I say "gratuitous" because unless `default` is a sentinel for "no option supplied", the `type` should always match type(default). Or am I wrong about that? Cheers, -- Cameron Simpson <c...@zip.com.au> DoD#743 http://www.cskk.ezoshosting.com/cs/ You only live once in life, but if you do it right, once is enough! - Rob Castro <r...@columbia.edu> -- http://mail.python.org/mailman/listinfo/python-list