Antoine Pitrou added the comment:

> That's not what it means. Python parameters are "optional" if they
> have a default value.  These parameters are "nullable", in the sense
> that they can be either of a specific type or "None".  (But "Noneable"
> seemed like a bad name).  They are not necessarily optional.

int(or_none=True) ?

> > - the fact that the structs are defined in longobject.h looks bonkers
> 
> Okay.  What would be better?  modsupport.h?

Hmm, do we have a getargs.h ?

> > - boolean fields can be "char" instead of "int" (and moved at the
> >   end to pack the structure more efficiently)
> 
> Is Python really compiled with packed structures?

You don't understand me. If you write:
  struct X { int A; char B; char C; }
the structure will be packed *by definition* (IIRC).

> > - PyLong_AsSsize_t can't fail?
> 
> Not on an object returned by PyNumber_Index().

And what if the long is too long to fit in a Py_ssize_t?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20341>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to