On Nov 12, 9:09 pm, Steve Howell wrote:
> On Nov 12, 7:21 am, rusi wrote:
>
> > On Nov 12, 12:09 pm, rusi wrote:> This is a classic
> > problem -- structure clash of parallel loops
>
> >
>
> > Sorry wrong solution :D
>
> > The fidgetiness is entirely due to python not allowing C-style loops
>
On Nov 12, 7:21 am, rusi wrote:
> On Nov 12, 12:09 pm, rusi wrote:> This is a classic
> problem -- structure clash of parallel loops
>
>
>
> Sorry wrong solution :D
>
> The fidgetiness is entirely due to python not allowing C-style loops
> like these:
>
> >> while ((c=getchar()!= EOF) { ... }
>
rusi wrote:
> The fidgetiness is entirely due to python not allowing C-style loops
> like these:
> >>> while ((c=getchar()!= EOF) { ... }
for c in iter(getchar, EOF):
...
> Clearly the fidgetiness is there as before and now with extra coroutine
> plumbing
Hmm, very funny...
--
http://mai
On Nov 12, 12:09 pm, rusi wrote:
> This is a classic problem -- structure clash of parallel loops
Sorry wrong solution :D
The fidgetiness is entirely due to python not allowing C-style loops
like these:
>> while ((c=getchar()!= EOF) { ... }
Putting it into coroutine form, it becomes something
On Nov 11, 3:58 am, Roy Smith wrote:
> I'm trying to pull down tweets with one of the many twitter APIs. The
> particular one I'm using (python-twitter), has a call:
>
> data = api.GetSearch(term="foo", page=page)
>
> The way it works, you start with page=1. It returns a list of tweets.
> If the
On Nov 11, 4:44 pm, Cameron Simpson wrote:
> On 11Nov2012 11:16, Steve Howell wrote:
> | On Nov 11, 10:34 am, Peter Otten <__pete...@web.de> wrote:
> | > Steve Howell wrote:
> | > > On Nov 11, 1:09 am, Paul Rubin wrote:
> | > >> Cameron Simpson writes:
> | > >> > | I'd prefer the original code
On 11Nov2012 11:16, Steve Howell wrote:
| On Nov 11, 10:34 am, Peter Otten <__pete...@web.de> wrote:
| > Steve Howell wrote:
| > > On Nov 11, 1:09 am, Paul Rubin wrote:
| > >> Cameron Simpson writes:
| > >> > | I'd prefer the original code ten times over this inaccessible beast.
| > >> > Me too.
In article ,
Peter Otten <__pete...@web.de> wrote:
> deque(
> imap(
> process,
> chain.from_iterable(
> takewhile(bool, imap(partial(api.GetSearch, term), count(1),
> maxlen=0)
>
> ;)
If I wanted STL, I would still be writing C++ :-)
--
http://mail.pyth
On Nov 11, 10:34 am, Peter Otten <__pete...@web.de> wrote:
> Steve Howell wrote:
> > On Nov 11, 1:09 am, Paul Rubin wrote:
> >> Cameron Simpson writes:
> >> > | I'd prefer the original code ten times over this inaccessible beast.
> >> > Me too.
>
> >> Me, I like the itertools version better. The
Steve Howell wrote:
> On Nov 11, 1:09 am, Paul Rubin wrote:
>> Cameron Simpson writes:
>> > | I'd prefer the original code ten times over this inaccessible beast.
>> > Me too.
>>
>> Me, I like the itertools version better. There's one chunk of data
>> that goes through a succession of transform
On Nov 11, 1:09 am, Paul Rubin wrote:
> Cameron Simpson writes:
> > | I'd prefer the original code ten times over this inaccessible beast.
> > Me too.
>
> Me, I like the itertools version better. There's one chunk of data
> that goes through a succession of transforms each of which
> is very str
On Sunday, November 11, 2012 1:54:46 AM UTC-8, Peter Otten wrote:
> Paul Rubin wrote:
>
>
>
> > Cameron Simpson writes:
>
> >> | I'd prefer the original code ten times over this inaccessible beast.
>
> >> Me too.
>
> >
>
> > Me, I like the itertools version better. There's one chunk of da
Paul Rubin wrote:
> Cameron Simpson writes:
>> | I'd prefer the original code ten times over this inaccessible beast.
>> Me too.
>
> Me, I like the itertools version better. There's one chunk of data
> that goes through a succession of transforms each of which
> is very straightforward.
[Steve
Cameron Simpson writes:
> | I'd prefer the original code ten times over this inaccessible beast.
> Me too.
Me, I like the itertools version better. There's one chunk of data
that goes through a succession of transforms each of which
is very straightforward.
--
http://mail.python.org/mailman/lis
On 11Nov2012 08:56, Stefan Behnel wrote:
| Steve Howell, 11.11.2012 04:03:
| > On Nov 10, 2:58 pm, Roy Smith wrote:
| >> page = 1
| >> while 1:
| >> r = api.GetSearch(term="foo", page=page)
| >> if not r:
| >> break
| >> for tweet in r:
| >>
Steve Howell, 11.11.2012 04:03:
> On Nov 10, 2:58 pm, Roy Smith wrote:
>> I'm trying to pull down tweets with one of the many twitter APIs. The
>> particular one I'm using (python-twitter), has a call:
>>
>> data = api.GetSearch(term="foo", page=page)
>>
>> The way it works, you start with page=1
On Nov 10, 2:58 pm, Roy Smith wrote:
> I'm trying to pull down tweets with one of the many twitter APIs. The
> particular one I'm using (python-twitter), has a call:
>
> data = api.GetSearch(term="foo", page=page)
>
> The way it works, you start with page=1. It returns a list of tweets.
> If the
On Sat, 10 Nov 2012 17:58:14 -0500, Roy Smith wrote:
> The way it works, you start with page=1. It returns a list of tweets.
> If the list is empty, there are no more tweets. If the list is not
> empty, you can try to get more tweets by asking for page=2, page=3, etc.
> I've got:
>
> page =
On Sat, Nov 10, 2012 at 3:58 PM, Roy Smith wrote:
> I'm trying to pull down tweets with one of the many twitter APIs. The
> particular one I'm using (python-twitter), has a call:
>
> data = api.GetSearch(term="foo", page=page)
>
> The way it works, you start with page=1. It returns a list of twe
I'm trying to pull down tweets with one of the many twitter APIs. The
particular one I'm using (python-twitter), has a call:
data = api.GetSearch(term="foo", page=page)
The way it works, you start with page=1. It returns a list of tweets.
If the list is empty, there are no more tweets. If t
20 matches
Mail list logo