On 19 janv. 2014, at 09:12, Shai Berger <s...@platonix.com> wrote: > I think this is suboptimal, API-wise. Python destroys temporaries soon > enough. > Is there a reason why we cannot arrange for a __del__ method to close the > cursor? Circular references anywhere?
Hi Shai, You probably meant CPython ;-) I believe this change will improve consistency with other Python implementations, notably PyPy. Following your reasoning, we should also stop bothering about closing files, as Python will do it. But that's a bad practice and Python 3.3+ even raises warnings in that situation. Is there a difference between file descriptors and cursors (in practice TCP sockets) that justifies treating them differently? (Honest question — I don’t know.) -- Aymeric. -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at http://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/C9435FD7-412A-41DA-9E13-90264B812B94%40polytechnique.org. For more options, visit https://groups.google.com/groups/opt_out.