Message282861
| Author |
mdk |
| Recipients |
larry, mdk |
| Date |
2016年12月10日.17:12:56 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1481389976.88.0.777049011956.issue28933@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Today, writing an AC declaration like:
something: Py_ssize_t(c_default="-1") = None
Leads to the almost obvious "Py_ssize_t_converter: default value None for field something is not of type int".
But it actually make sense:
- Accept None as a default python value
- Document "something=None" in the docstring
- Write `Py_ssize_t something = -1` in the C code
- Don't try to parse the argument if it's the default value, keeping the value from the C initialization
In other words, it's a "Give -1 to the C implementation when argument is not given or None, and it may be usefull, typically I'll use it in issue28754. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2016年12月10日 17:12:56 | mdk | set | recipients:
+ mdk, larry |
| 2016年12月10日 17:12:56 | mdk | set | messageid: <1481389976.88.0.777049011956.issue28933@psf.upfronthosting.co.za> |
| 2016年12月10日 17:12:56 | mdk | link | issue28933 messages |
| 2016年12月10日 17:12:56 | mdk | create |
|