This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Oren Milman
Recipients Oren Milman
Date 2017-10-06.18:09:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1507313388.78.0.213398074469.issue31718@psf.upfronthosting.co.za>
In-reply-to
Content
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).
History
Date User Action Args
2017-10-06 18:09:48Oren Milmansetrecipients: + Oren Milman
2017-10-06 18:09:48Oren Milmansetmessageid: <1507313388.78.0.213398074469.issue31718@psf.upfronthosting.co.za>
2017-10-06 18:09:48Oren Milmanlinkissue31718 messages
2017-10-06 18:09:48Oren Milmancreate