[Python-3000] parameter lists [was: Type Expressions]
Ron Adam
rrr at ronadam.com
Fri Apr 21 19:49:43 CEST 2006
Giovanni Bajo wrote:
> Ron Adam <rrr at ronadam.com> wrote:
>
>> This *may* relate to None being an object which isn't the same as
>> "not a value". There currently isn't a way (that I know of) to
>> specify a generally null object outside of sequences.
>>
>> def f(a, b, c=Null, d=x): # Using None here wouldn't work.
>>
>>
>> Recently I found a case where I wanted to return something that was
>> more literally *nothing* than a None is. So maybe a null symbol of
>> some sort might be useful in other cases as well?
>
> And what's wrong with:
>
> class Null: pass
> def f(a, b, c=Null, d=x):
> [...]
>
> Giovanni Bajo
That would only be part way there. The interpreter would need to know
about the Null object so it could treat it as a missing value in the
case of a function definition.
And Guido already said NULL wouldn't be part of the language.
Cheers,
Ron
More information about the Python-3000
mailing list