This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients Jim.Jewett, Yury.Selivanov, asvetlov, ebfe, jimjjewett, kristjan.jonsson, lehmannro, michael.foord, pitrou, stutzbach
Date 2012-03-31.11:57:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1333195076.59.0.508947389653.issue10576@psf.upfronthosting.co.za>
In-reply-to
Content
Comments:

- the tests look fragile. How can you know a garbage collection will only collect your own objects? So you should call gc.collect() first at the beginning of each test and then initialize the self.visit list. We don't want weird failures because of the unittest machinery or anything else.

- I also don't understand the logic in testCollect. Why can't you directly check the contents of self.visit instead of that convoluted code?

- In invoke_gc_callback(), "i" should be a Py_ssize_t, not an int

- In invoke_gc_callback(), in which situation can callbacks be something else than a list? I think the PyList_Check() should be an assert (and probably use PyList_CheckExact()).

- Finally, *please* try to follow PEP 8. Comments should have a space after the "#". Otherwise they look unreadable.
History
Date User Action Args
2012-03-31 11:57:56pitrousetrecipients: + pitrou, jimjjewett, kristjan.jonsson, lehmannro, stutzbach, michael.foord, ebfe, asvetlov, Yury.Selivanov, Jim.Jewett
2012-03-31 11:57:56pitrousetmessageid: <1333195076.59.0.508947389653.issue10576@psf.upfronthosting.co.za>
2012-03-31 11:57:56pitroulinkissue10576 messages
2012-03-31 11:57:55pitroucreate