Guido van Rossum wrote:
> On 4/21/06, Ron Adam <[EMAIL PROTECTED]> wrote:
>> 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?
> 
> You're not gonna get something that's a valid expression *and* is more
> "nothing" than None.

Yes, it would require special casing either by object methods and/or by 
the interpreter to work in a general way.  Which is probably enough of a 
reason not to do it.

> On a case by case basis there might be syntax indicating the absence
> of something that is distinguishable from 'None'; for example, using
> *args you can reliaby whether an argument was passed or not (unlike
> using None as a default, which can be defeated by passing an explicit
> None).

Yes, in cases where containers are used, as in *args, the identity "x == 
x + empty_container"  works.  What I was looking for was the same 
identity operations with an append method.

     x == x.append(foo(y))   # when foo returns a NULL object.

Not that it's a big deal, I just thought it might also fit with Gregs 
suggestion as well where a keyword with a NULL could indicate a defualt 
isn't present and must be supplied when used as a defualt.


 > But a generic NULL won't be part of the language.

I'm fine with that.  I realized it may need a lot more *good* use cases 
to not have the special isn't special enough guide line apply.

Cheers,
    Ron


> --
> --Guido van Rossum (home page: http://www.python.org/~guido/)

_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to