On Thu, 25 Mar 2021 23:37:46 -0700 "Gregory P. Smith" <g...@krypto.org> wrote: > On Thu, Mar 25, 2021 at 11:58 AM Mark Shannon <m...@hotpy.org> wrote: > > > Hi Victor, > > > > I'm with you 100% on not returning borrowed references, doing so is just > > plain dangerous. > > > > However, is a blanket ban on stealing references the right thing? > > > > Maybe the problem is the term "stealing". > > The caller is transferring the reference to the callee. > > In some circumstances it can make a lot of sense to do so, since the > > caller has probably finished with the reference and the callee needs a > > new one. > > > > Cheers, > > Mark. > > > > When was the last time a non-internal API that transferred references added? > > I suggest keeping the restriction on new APIs in place until we actually > find a situation where we think we "need" one outside of Include/internal/ > to help force the discussion as to why that needs to be public.
+1. Regards Antoine. _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/TH6PGVQIVOXWAF5OL3USQWFUPKUPKO5U/ Code of Conduct: http://python.org/psf/codeofconduct/