Message222248
If any of these actually return borrowed references, I'd consider it a serious documentation bug to not mention it. New reference semantics are the default, and while it's best to call them out, it can be assumed in most cases. Returning borrowed references without a big honking "not a normal function" flag in the docs causes a big problem.
Heck, the lack of such a big warning flag on PyDict_Next (which doesn't return a PyObject, but populates via a double pointer) caused me a major headache recently when I DECREF-ed the resulting objects. Totally my fault (the description says they're borrowed), but I rely on that "Returns: Borrowed Reference" header so much that I made a dumb mistake. |
|
Date |
User |
Action |
Args |
2014-07-04 00:39:31 | josh.r | set | recipients:
+ josh.r, meador.inge, docs@python, BreamoreBoy, baruch.sterin |
2014-07-04 00:39:31 | josh.r | set | messageid: <1404434371.56.0.586553012778.issue14189@psf.upfronthosting.co.za> |
2014-07-04 00:39:31 | josh.r | link | issue14189 messages |
2014-07-04 00:39:30 | josh.r | create | |
|