[Python-ideas] Default return values to int and float

Chris Rebert pyideas at rebertia.com
Mon Oct 3 12:49:25 CEST 2011


On Mon, Oct 3, 2011 at 3:41 AM, Masklinn <masklinn at masklinn.net> wrote:
> -0 on proposal, no big judgement (although it might cause issues:
> if `int` and `float` can take a default, why not `dict` or
> `Decimal` as well?), but
> On 2011-10-03, at 11:57 , Chris Rebert wrote:
>>
>> Or would None just be inelegantly special-cased, or…?
> Why inelegantly?

There are use-cases (albeit relatively rare) for non-None null values.
Special-casing NoneType would exclude those use-cases (which is a
entirely reasonable trade-off option to choose).

Cheers,
Chris



More information about the Python-ideas mailing list