A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-June/135023.html below:

[Python-Dev] Why does IOBase.__del__ call .close?

[Python-Dev] Why does IOBase.__del__ call .close? [Python-Dev] Why does IOBase.__del__ call .close?Antoine Pitrou antoine at python.org
Wed Jun 11 04:28:17 CEST 2014
Le 10/06/2014 21:30, Nikolaus Rath a écrit :
>
> For me, having __del__ call close() does not qualify as a reasonable
> default implementation unless close() is required to be idempotent
> (which one could deduce from the documentation if one tries to, but it's
> far from clear).

close() should indeed be idempotent on all bundled IO class 
implementations (otherwise it's a bug), and so should it preferably on 
third-party IO class implementations.

If you want to improve the documentation on this, you're welcome to 
provide a patch!

Regards

Antoine.


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4