[Python-Dev] Surely "nullable" is a reasonable name?
ncoghlan at gmail.com
Mon Aug 4 14:22:17 CEST 2014
On 4 Aug 2014 18:16, "Oleg Broytman" <phd at phdru.name> wrote:
> On Mon, Aug 04, 2014 at 05:12:47PM +1000, Larry Hastings <
larry at hastings.org> wrote:
> > "nullable=True", which means "also accept None
> > for this parameter". This was originally intended for use with
> > strings (compare the "s" and "z" format units for PyArg_ParseTuple),
> > however it looks like we'll have a use for "nullable ints" in the
> > ongoing Argument Clinic conversion work.
> > Several people have said they found the name "nullable" surprising,
> > suggesting I use another name like "allow_none" or "noneable". I,
> > in turn, find their surprise surprising; "nullable" is a term long
> > associated with exactly this concept. It's used in C# and SQL, and
> > the term even has its own Wikipedia page:
> > http://en.wikipedia.org/wiki/Nullable_type
> In my very humble opinion, "nullable" is ok, but "allow_none" is
Yup, this is where I stand as well. The main concern I have with nullable
is that we *are* writing C code when dealing with Argument Clinic, and
"nullable" may make me think of a C NULL rather than Python's None.
> Oleg Broytman http://phdru.name/ phd at phdru.name
> Programmers don't die, they just GOSUB without RETURN.
> Python-Dev mailing list
> Python-Dev at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev