Message198202
On Sat, Sep 21, 2013 at 5:52 AM, Nick Coghlan <report@bugs.python.org>wrote:
>
> Nick Coghlan added the comment:
>
> Actually, I think it's reasonable to define the custom target nominally
> abstracted by PullParser as always returning None from close(). As Eli
> notes, it's designed to let you discard events as you go, so remembering
> them internally to return from close() doesn't make sense.
>
IMHO the documentation is already sufficient w.r.t. this. By convention,
when a method does not return anything, we just don't mention its return
value. So:
close()
Signal the parser that the data stream is terminated.
Seems good.
> That means the patch could be simplified to just removing the root
> attribute without changing the result of calling close().
>
Unfortunately I don't have time to review refactoring patches now. In light
of a larger refactoring planned in this part of the module in the future, I
don't think it's very important to tweak things right now. |
|
Date |
User |
Action |
Args |
2013-09-21 14:05:28 | eli.bendersky | set | recipients:
+ eli.bendersky, ncoghlan, scoder, serhiy.storchaka |
2013-09-21 14:05:28 | eli.bendersky | link | issue18990 messages |
2013-09-21 14:05:28 | eli.bendersky | create | |
|