[Python-3000] Comparing to None

Talin talin at acm.org
Sat Feb 2 03:04:18 CET 2008


I would like to present an argument both for and against the proposal.

Against: I've never personally needed this capability.

For: In many languages, the 'null' value has a special polymorphic 
behavior in that it is considered a subtype of all reference types. Thus 
in C, you can assign NULL to a Foo * or a Bar * even though Foo and Bar 
aren't related.

So making NULL special seems in line with the general trend.

Raymond Hettinger wrote:
>> You should have been there when this was decided about two years ago.
> 
> IIRC, the decision was a general one about cross-type 
> comparisons not being turned-on the default.  I do not 
> recall a specific discussion about None.
> 
> Also, the list at the time was flooded with propositions
> ranging from the reasonable to the insane. It was not always
> possible to know what to respond to or the implications of each
> choice. I sure wasn't aware that those conversations were to be
> immediately frozen in stone. I had thought one of the purposes 
> of the Py3.0 was so that we could download it and explore the 
> implications of all of these choices.  I've done so and bumped
> into the None comparability issue several times. If you no 
> longer want feedback, that's fine. I can bring my 
> experimentation with the 3.0 alpha to a close.
> 
> Raymond
> _______________________________________________
> Python-3000 mailing list
> Python-3000 at python.org
> http://mail.python.org/mailman/listinfo/python-3000
> Unsubscribe: http://mail.python.org/mailman/options/python-3000/talin%40acm.org
> 


More information about the Python-3000 mailing list