[PyKDE] SIP: difference between TransferBack and Factory

Giovanni Bajo rasky at develer.com
Wed Oct 26 00:30:19 BST 2005


Hello,

Having read the SIP documentation, it is not clear to me what is the difference
between using TransferBack and using Factory as annotation for a function. It
*looks* like Factory should be used for new objects, and TransferBack for
objects that existed "before" (for some meaning of before). My doubt is: why
does SIP care whether the function just created the object, or got it from
somewhere else, as long as the semantic is that Python will own the object
after the call? Why should it care whether it already seen it as a Python
object or not?

Can anybody elaborate a little?

Giovanni Bajo




More information about the PyQt mailing list