[Patches] [ python-Patches-1443865 ] gc.get_count() and other changes

SourceForge.net noreply at sourceforge.net
Tue Mar 7 00:42:07 CET 2006


Patches item #1443865, was opened at 2006-03-05 20:09
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1443865&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Core (C code)
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Barry A. Warsaw (bwarsaw)
Assigned to: Skip Montanaro (montanaro)
Summary: gc.get_count() and other changes

Initial Comment:
This patch adds gc.get_count() as a companion to
gc.get_threshold().  It also adds an optional argument
to  gc.collect() to allow you to specify the generation
to collect.

This patch also fixes a couple of gcc warnings.


----------------------------------------------------------------------

>Comment By: Neal Norwitz (nnorwitz)
Date: 2006-03-06 15:42

Message:
Logged In: YES 
user_id=33168

I fixed the 2 warnings with %ld, so that part of the patch
isn't necessary any longer.

Instead of setting genarg = -999, can't you just set it to
NUM_GENERATIONS - 1 and get rid of the check for -999?

Doesn't ValueError make more sense than an IndexError? 
Isn't ValueError typically used for invalid args?

Should gc_collect be:  METH_VARARGS | METH_KEYWORDS ?


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1443865&group_id=5470


More information about the Patches mailing list