Thanks! Looking pretty good already - I'm assigning it PSEP 106 (should've
done it earlier already). I took the liberty of adding the post history
and updating the discussion section for you. The latest version is here:

http://www.pyside.org/docs/pseps/psep-0106.html


Few comments still below.

> ``wrapInstance(address, type)``
> 
>     Creates a Python wrapper for a C++ object instantiated at a given
>memory
>     address - the returned object type will be the same given by the
>user.
> 
>     The type must be a Shiboken type, the C++ object will not be
>     destroyed when the returned Python object reach zero references.
> 
>     If the address is invalid or doesn't point to a C++ object of given
>type
>     the behavior is undefined.

Here, I am slightly bothered by the last paragraph. I am assuming that
when given an invalid address, this operation might indeed result in a
segfault or a very broken object. Is it possible to do any kind of testing
for the pointer validity? Perhaps not? If so, could it be more explicitly
stated that an invalid pointer will very likely result in a segfault or,
well, undefined behaviour.

> ``wasCreatedByPython(obj)``
> 
>     Returns true if the given Python object was created by Python.

Wouldn't this be more consistent if it was just "isCreatedByPython"? At
least in Qt there are no methods starting with "was", AFAIK.

How about the counterparts for these sip methods:


isDeleted
setDeleted
__version__
__version_info__

Also the transferto and transferback sound like they could be really
useful for debugging purposes (although I hate the names).

So, I propose adding the above methods to the PSEP as well.

Cheers,

ma.

_______________________________________________
PySide mailing list
[email protected]
http://lists.pyside.org/listinfo/pyside

Reply via email to