Eli Bendersky added the comment:

On Sat, Sep 21, 2013 at 5:52 AM, Nick Coghlan <rep...@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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18990>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to