memory leak - C API
John Hunter
jdhunter at ace.bsd.uchicago.edu
Fri Dec 5 16:13:00 EST 2003
More information about the Python-list mailing list
Fri Dec 5 16:13:00 EST 2003
- Previous message (by thread): memory leak - C API
- Next message (by thread): memory leak - C API
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>>>>> "Tim" == Tim Peters <tim.one at comcast.net> writes: Tim> Where did that understanding come from? It's important to Tim> track it down, because whatever source you got it from is Tim> unreliable. This one is such a common misconception that the Tim> docs (Python C/API Reference Manual, section "Reference Count Tim> Details") point it out explicitly: Argg... I got it from reading the API for PyList_GetItem and *assuming* it worked the same way for PySequence_GetItem. I was using the PyList API as a stand-in for the sequence API because I didn't find the PySequence API. I ended up at http://www.python.org/doc/current/api/sequenceObjects.html by googling. Perhaps the best way to help others avoid making the same mistake is to make a link on the http://www.python.org/doc/current/api/sequenceObjects.html page to http://www.python.org/doc/current/api/sequence.html page, which I only found after reading your post. Eg, on http://www.python.org/doc/current/api/sequenceObjects.html, something like For generic operations on sequence objects, see the sequence protocol <a href=http://www.python.org/doc/current/api/sequence.html>PySequence<a/>; this section deals with the specific kinds of sequence objects that are intrinsic to the Python language. The link "PySequence" would have caught my eye (since I was looking for it), but the bland Generic operations on sequence objects were discussed in the previous chapter; this section deals with the specific kinds of sequence objects that are intrinsic to the Python language. did not. Thanks for the help, John Hunter
- Previous message (by thread): memory leak - C API
- Next message (by thread): memory leak - C API
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list