Message208810
| Author |
pitrou |
| Recipients |
Yury.Selivanov, brett.cannon, georg.brandl, jkloth, larry, pitrou, serhiy.storchaka, taleinat, vajrasky, zach.ware |
| Date |
2014年01月22日.14:23:07 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1390400584.2306.4.camel@fsol> |
| In-reply-to |
<1390400082.43.0.438750101478.issue20341@psf.upfronthosting.co.za> |
| Content |
> 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? |
|