On 08/05/2014 03:53 AM, Antoine Pitrou wrote:
Le 04/08/2014 13:36, Alexander Belopolsky a écrit :
If the receiving type is PyObject*, either NULL or Py_None is a valid
choice.
But here the receiving type can be an int.
Just to be precise: in the case where the receiving type *would* have
been an int, and "nullable=True", the receiving type is actually a
structure containing an int and a "you got a None" flag. I can't stick a
magic value in the int and say "that represents you getting a None"
because any integer value may be valid.
Also, I'm pretty sure there are places in builtin argument parsing that
accept either NULL or Py_None, and I *think* maybe in one or two of them
they actually mean different things. What fun!
For small values of "fun",
//arry/
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com