Message303842
Given an uninitialized IncrementalNewlineDecoder:
uninitialized = io.IncrementalNewlineDecoder.__new__(io.IncrementalNewlineDecoder)
each of the following calls would raise a SystemError ('null argument to
internal routine'):
uninitialized.getstate()
uninitialized.setstate((b'foo', 0))
uninitialized.reset()
In contrast, the following call would raise a ValueError
('IncrementalNewlineDecoder.__init__ not called'):
uninitialized.decode(b'bar')
ISTM that getstate(), setstate(), and reset() should have the same behavior as
decode(). (Though i think that including the actual type name in the error
message would be better, as it could be a subclass of IncrementalNewlineDecoder). |
|
Date |
User |
Action |
Args |
2017-10-06 18:09:48 | Oren Milman | set | recipients:
+ Oren Milman |
2017-10-06 18:09:48 | Oren Milman | set | messageid: <1507313388.78.0.213398074469.issue31718@psf.upfronthosting.co.za> |
2017-10-06 18:09:48 | Oren Milman | link | issue31718 messages |
2017-10-06 18:09:48 | Oren Milman | create | |
|