Closed GoogleCodeExporter closed 9 years ago
I personally find GetGeneratorFromLinkFinder more appealing than
AddAllElementsFromAllPages. It seems like combining entries into the original
feed
could hide information that you might be interested in from the second, third,
fourth, feed objects which are retrieved. The feed object would still have a
next
link which points to "page 2" even though the entries for the second page are
now in
the feed.
Original comment by jscud.w...@gmail.com
on 14 Jan 2010 at 12:16
I agree in principle, and indeed this is intended to lay the groundwork for
letting
groups.service.GroupsService use GetGeneratorFromLinkFinder, but
AddAllElementsFromAllPages is already used in the existing codebase, and was
unnecessarily twice written, so I figured I'd move both into the superclass.
Original comment by apro...@google.com
on 14 Jan 2010 at 12:20
Here's an alternate suggestion for AddAllElementsFromAllPages, since Python
supports
multiple inheritance, it would be pretty easy to create a class with this
method and
use it as a mixin anywhere that it is needed. (This is the approach used with
LinkFinder, take a look in src/gdata/__init__.py).
Original comment by jscud.w...@gmail.com
on 15 Jan 2010 at 5:58
Hi Aprotim, just wondering what you thought of this idea. Seems like this would
be
something that would be good to have in the next release (going out on
Tuesday). If
you are tied up with other stuff I can take a stab at it but you understand the
need
better than I.
Original comment by jscud.w...@gmail.com
on 23 Jan 2010 at 2:23
Original comment by jscud.w...@gmail.com
on 23 Jan 2010 at 2:24
Update - remove all calls to AddAllElementsFromAllPages, replace with
list(_GetElementGeneratorFromLinkFinder()), which will coerce the generator
into a
list. If you want, we can not do the coercion - I'm not sure if that can
possibly
break other people's code.
Leave AddAllElementsFromAllPages for backwards compatibility, but suggest we
deprecated it.
Original comment by apro...@google.com
on 26 Jan 2010 at 1:37
Attachments:
Looks great! I've checked this in as revision 926.
Original comment by jscud.w...@gmail.com
on 26 Jan 2010 at 6:49
Original issue reported on code.google.com by
apro...@google.com
on 13 Jan 2010 at 7:53Attachments: