Stefan Behnel wrote:
> It doesn't matter, though. If the code says
> 
>     def func(object obj not None):
> 
> then it is clear that None should not be allowed, which may or may not make 
> sense in a given situation. It certainly doesn't hurt anyone, so why should 
> we actively keep users from doing this?

well, it's kind of like:

def func(int obj not 5):

which would be a pretty cool feature, but I don't think we're trying to 
support that!

both None and object are special cases, so there may not be any "right" 
thing to do.

 > then it is clear that None should not be allowed

True -- it's probably not a good idea to allow the syntax, but not have 
it do anything, so I'd say either catch it at compile time, or have it 
check for None at run time.

-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

[email protected]
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to