
3 Oct
2011
3 Oct
'11
5:41 a.m.
-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?
isinstance(default, (cls, types.NoneType))
is pretty elegant and clearly expresses the type constraint, which is an anonymous sum type[0]. Only issue is that Sphinx has no support for sum types for the moment.