XuanEmily / pydelicious

Automatically exported from code.google.com/p/pydelicious
Other
0 stars 0 forks source link

small bug in the convenience "get" function if using the count parameter #16

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
if one does a pydelicious.get("a", "b", count=3), for example, pydelicious 
throws an error, because it 
tries to get the list-subset from the enclosing dictionary:

if count != 0: posts = posts[0:count]

since posts is no list but a dict, this obviously doesn't work. the fix is as 
follows:
if count != 0: posts["posts"] = posts["posts"][0:count]

Original issue reported on code.google.com by terhec...@gmail.com on 26 Apr 2008 at 1:40

GoogleCodeExporter commented 8 years ago
Hi terhechte,
Thanks for the report. I have merged your fix into the latest revision.

Original comment by dfdes...@gmail.com on 9 May 2008 at 5:27