[Python-Dev] Surely "nullable" is a reasonable name?

Alexander Belopolsky alexander.belopolsky at gmail.com
Mon Aug 4 20:04:05 CEST 2014


On Mon, Aug 4, 2014 at 1:53 PM, Antoine Pitrou <antoine at python.org> wrote:

> I disagree. Unlike "nullable", "allow_none" does not tell me what
>> happens on the C side when I pass in None.  If the receiving type is
>> PyObject*, either NULL or Py_None is a valid choice.
>>
>
> But here the receiving type can be an int.


We cannot "allow None" when the receiving type is C int.  In this case, we
need a way to implement "nullable int" type in C.  We can use int * or a
pair of int and _Bool or anything else.  Whatever the implementation, the
concept that is implemented is "nullable int."  The advantage of using the
term "nullable" is that it is language and implementation neutral.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20140804/7cbaf6ea/attachment-0001.html>


More information about the Python-Dev mailing list