On Aug 7, 2009, at 2:18 AM, Greg Ewing wrote:

> Robert Bradshaw wrote:
>> Yep, an INCREF is always generated on assignment to an object
>> variable
>
> Well, it's not quite as simple as that, because the
> result of an expression that returns a new reference
> isn't increfed on assignment. But a value being
> cast to object is considered a borrowed reference,
> so an incref is generated in that case.

True. The point I was trying to make is the cast doesn't cause the  
incref, the assignment does.

- Robert


_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to