Alexander Belopolsky added the comment:

The affected code is the only case I could find in stdlib where O& 
format was used to populate PyObject* variables.  Although it appears to 
be valid usage, the code presents an exception to the following note at 
http://docs.python.org/dev/c-api/arg.html : "Note that any Python object 
references which are provided to the caller are borrowed references; do 
not decrement their reference count!"

Should we add that O& a possible exception to this rule?  I'll propose a  
specific change if we agree in principle.  I am not sure if O& 
documentation should make any recommendations to the writers of 
conversion functions.  For example, O& convertors returning a borrowed 
reference may be discouraged in favor of O or O& variants or returning 
PyObject* from a convertor may be discouraged altogether.

I am adding Georg who accepted my other documentation changes in this 
area to the "nosy" list.

----------
nosy: +georg.brandl

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2222>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to