Re: [Python-3000] PyException_Set{Traceback,Cause,Context}

2008-06-22 Thread Collin Winter
On Sun, Jun 22, 2008 at 5:32 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On Sun, Jun 22, 2008 at 1:25 PM, Antoine Pitrou <[EMAIL PROTECTED]> wrote: >> I don't know who designed that API but what is the reason for >> PyException_Set{Traceback,Cause,Context} not to INCREF their argument? It >>

Re: [Python-3000] PyException_Set{Traceback,Cause,Context}

2008-06-22 Thread Greg Ewing
Antoine Pitrou wrote: what is the reason for PyException_Set{Traceback,Cause,Context} not to INCREF their argument? Probably because the vast majority of the time the caller is not doing anything further with these references, so this arrangement saves some increfs and decrefs. -- Greg ___

Re: [Python-3000] PyException_Set{Traceback,Cause,Context}

2008-06-22 Thread Guido van Rossum
On Sun, Jun 22, 2008 at 1:25 PM, Antoine Pitrou <[EMAIL PROTECTED]> wrote: > I don't know who designed that API but what is the reason for > PyException_Set{Traceback,Cause,Context} not to INCREF their argument? It > means > the caller has to do it himself, and seems inconsistent with most of Pyth