On 06.05.2011 12:27, Antoine Pitrou wrote:
> On Fri, 06 May 2011 13:28:11 +1200
> Greg Ewing <greg.ew...@canterbury.ac.nz> wrote:
> 
>> Amaury Forgeot d'Arc wrote [concerning the Doc/data/refcounts.dat file]:
>> 
>> > This is not always true, for example when the item is already present
>> > in the dict.
>> > It's not important to know what the function does to the object,
>> > Only the action on the reference is relevant.
>> 
>> Yes, that's the whole point. When using a functon,
>> what you need to know is whether it borrows or steals
>> a reference.
> 
> Doesn't "borrow" mean the same as "steal" in that context?
> If an API borrows a reference, I expect it to take it from me.

Basically, "borrow" is applied to return values (or, more generally,
"out" parameters), and means that *you* borrowed the reference.
"steal", OTOH, is applied to (and the exception for) "in" parameters.

Georg


_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to