Antoine Pitrou wrote:

(and here we see why reference-stealing APIs are a nuisance: because
you never know in advance whether a function will steal a reference or
not, and you have to read the docs for each and every C API call you
make)

Fortunately, they're very rare, so you don't encounter
them often.

Unfortunately, they're very rare, so you're all the more
likely to forget about them and get bitten.

Functions with ref-stealing APIs really ought to have
a naming convention that makes them stand out and remind
you to consult the documentation.

--
Greg
_______________________________________________
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