[Python-Dev] Why does _PyUnicode_FromId return a new reference?

Antoine Pitrou solipsis at pitrou.net
Sat Nov 5 23:26:11 CET 2011


Given it returns an eternal object, and it's almost always used
temporarily (for attribute lookup, string joining, etc.), it would seem
more practical for it to return a borrowed reference.

Regards

Antoine.




More information about the Python-Dev mailing list