Differences between revisions 3 and 4
Revision 3 as of 2003-04-14 14:00:29
Size: 553
Editor: usrtc-pool-134
Comment:
Revision 4 as of 2003-04-14 19:43:19
Size: 551
Editor: pD9530645
Comment:
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
"""
Word to the wise: don't ever try to reuse a variable whose address is
passed to PyArg_ParseTuple for anything other than holding what
PyArg_ParseTuple does or doesn't store into it. You'll never get the
decrefs straight (and even if you manage to at first, the next person to
modify your code will break it).
"""
 ''Word to the wise: don't ever try to reuse a variable whose address is
 passed to `PyArg_ParseTuple` for anything other than holding what
 `PyArg_ParseTuple` does or doesn't store into it. You'll never get the
 decrefs straight (and even if you manage to at first, the next person to
 modify your code will break it).''
Line 13: Line 11:
---

Useful, practical notes and code snippets from the python-dev mailing list

After an 8-hour bug hunt, Tim Peters [http://mail.python.org/pipermail/python-dev/2003-April/034557.html noted this bit of wisdom]

  • Word to the wise: don't ever try to reuse a variable whose address is passed to PyArg_ParseTuple for anything other than holding what PyArg_ParseTuple does or doesn't store into it. You'll never get the decrefs straight (and even if you manage to at first, the next person to modify your code will break it).

PythonDevWisdom (last edited 2014-05-25 21:57:29 by EtienneRobillard)

Unable to edit the page? See the FrontPage for instructions.