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/2009-April/088272.html below:

[Python-Dev] Possible py3k io wierdness

[Python-Dev] Possible py3k io wierdness [Python-Dev] Possible py3k io wierdnessJames Y Knight foom at fuhm.net
Sun Apr 5 18:51:38 CEST 2009
On Apr 5, 2009, at 6:29 AM, Antoine Pitrou wrote:

> Brian Quinlan <brian <at> sweetapp.com> writes:
>>
>> I don't see why this is helpful. Could you explain why
>> _RawIOBase.close() calling self.flush() is useful?
>
> I could not explain it for sure since I didn't write the Python  
> version.
> I suppose it's so that people who only override flush()  
> automatically get the
> flush-on-close behaviour.

It seems that a separate method "_internal_close" should've been  
defined to do the actual closing of the file, and the close() method  
should've been defined on the base class as "self.flush();  
self._internal_close()" and never overridden.

James
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