[Python-Dev] Re: [Csv] csv module TODO list
Andrew McNamara
andrewm at object-craft.com.au
Fri Jan 7 07:13:22 CET 2005
>There's a bunch of jobs we (CSV module maintainers) have been putting
>off - attached is a list (in no particular order):
[...]
>Also, review comments from Jeremy Hylton, 10 Apr 2003:
>
> I've been reviewing extension modules looking for C types that should
> participate in garbage collection. I think the csv ReaderObj and
> WriterObj should participate. The ReaderObj it contains a reference to
> input_iter that could be an arbitrary Python object. The iterator
> object could well participate in a cycle that refers to the ReaderObj.
> The WriterObj has a reference to a writeline callable, which could well
> be a method of an object that also points to the WriterObj.
I finally got around to looking at this, only to realise Jeremy did the
work back in Apr 2003 (thanks). One question, however - the GC doco in
the Python/C API seems to suggest to me that PyObject_GC_Track should be
called on the newly minted object prior to returning from the initialiser
(and correspondingly PyObject_GC_UnTrack should be called prior to
dismantling). This isn't being done in the module as it stands. Is the
module wrong, or is my understanding of the reference manual incorrect?
--
Andrew McNamara, Senior Developer, Object Craft
http://www.object-craft.com.au/
More information about the Python-Dev
mailing list