On Fri, Jun 13, 2014, at 20:04, Nikolaus Rath wrote:
> Benjamin Peterson writes:
> > On Thu, Jun 12, 2014, at 18:06, Nikolaus Rath wrote:
> >> Consider this simple example:
> >>
> >> $ cat test.py
> >> import io
> >> import warnings
> >>
> >> class StridedStream(io.IOBase):
> >> def __init_
Benjamin Peterson writes:
> On Thu, Jun 12, 2014, at 18:06, Nikolaus Rath wrote:
>> Consider this simple example:
>>
>> $ cat test.py
>> import io
>> import warnings
>>
>> class StridedStream(io.IOBase):
>> def __init__(self, name, stride=2):
>> super().__init__()
>> self.fh
On Thu, Jun 12, 2014, at 18:06, Nikolaus Rath wrote:
> Consider this simple example:
>
> $ cat test.py
> import io
> import warnings
>
> class StridedStream(io.IOBase):
> def __init__(self, name, stride=2):
> super().__init__()
> self.fh = open(name, 'rb')
> self.stri
Benjamin Peterson writes:
> On Wed, Jun 11, 2014, at 17:11, Nikolaus Rath wrote:
>> MRAB writes:
>> > On 2014-06-11 02:30, Nikolaus Rath wrote:
>> >> Hello,
>> >>
>> >> I recently noticed (after some rather protacted debugging) that the
>> >> io.IOBase class comes with a destructor that calls sel
On Wed, Jun 11, 2014, at 17:11, Nikolaus Rath wrote:
> MRAB writes:
> > On 2014-06-11 02:30, Nikolaus Rath wrote:
> >> Hello,
> >>
> >> I recently noticed (after some rather protacted debugging) that the
> >> io.IOBase class comes with a destructor that calls self.close():
> >>
> >> [0] nikratio@v
MRAB writes:
> On 2014-06-11 02:30, Nikolaus Rath wrote:
>> Hello,
>>
>> I recently noticed (after some rather protacted debugging) that the
>> io.IOBase class comes with a destructor that calls self.close():
>>
>> [0] nikratio@vostro:~/tmp$ cat test.py
>> import io
>> class Foo(io.IOBase):
>>
On 11 Jun 2014 12:31, "Antoine Pitrou" wrote:
>
> 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
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 b
On 2014-06-11 02:30, Nikolaus Rath wrote:
Hello,
I recently noticed (after some rather protacted debugging) that the
io.IOBase class comes with a destructor that calls self.close():
[0] nikratio@vostro:~/tmp$ cat test.py
import io
class Foo(io.IOBase):
def close(self):
print('clos
Hello,
I recently noticed (after some rather protacted debugging) that the
io.IOBase class comes with a destructor that calls self.close():
[0] nikratio@vostro:~/tmp$ cat test.py
import io
class Foo(io.IOBase):
def close(self):
print('close called')
r = Foo()
del r
[0] nikratio@vostro
10 matches
Mail list logo