You are writing a comment about BossArray for list-like Yahoo search results, here is a quick summary:
I recently put together BossArray, which is a simple wrapper around the Yahoo BOSS search results (relying on the Yahoo BOSS Mashup Framework for the heavy lifting). It provides a dirt simple interface mimicking a normal Python list for most interaction.
You are responding to this comment written by Amaç Herdağdelen on November 15th 2008, 00:30.
Hi Will,
First of all thanks for the wrapper. It really made my life easier.
I think I may have found a small bug. When there are only two results and I want to access all of them the 64th line executes (there is one cached and one uncached result):
downloaded = [(index,self._download(index,1),)]
downloaded = [(index,self._download(index,1)[0],)]
Secondly, I have a question/suggestion: I want to group the result elements in sets. Whenever I index a particular result all of its set will be downloaded and cached. I.e: sets will be 0:50, 50:100, 100:150, ... Whenever I access a result like x[143] it should automatically download x[100:150] because 143 in in the range 100:150. That functionality would allow me to write a simple loop like:
from boss_array import BossArray
x = BossArray("Python")
["%s\n" % (r[abstract]) for r in x]
Thanks again!
Amaç
Please be aware that comment forms go stale after one hour.
Comments may make use of LifeFlow MarkDown. Raw html will be escaped.
Quick Introduction to LifeFlow MarkDown Syntax
A highlighted code block:
Other common languages work as well: scheme, python, java, html, etc.
Other markdown syntax: