[Alex Martelli]
> If you want to hoist for performance, you can hoist more:
>
> appenders = foo.append, qux.append
> while some_condition:
> for appender, anitem in zip(appenders, calculate_something()):
> appender(anitem)
You are of course claiming a performance improvement over Car
Xavier Morel <[EMAIL PROTECTED]> wrote:
> Alex Martelli wrote:
> > Carl Banks <[EMAIL PROTECTED]> wrote:
> >...
> >>> class better_list (list):
> >>> tail = property(None, list.append)
> >> This is an impressive, spiffy little class.
> >
> > Yes, nice use of property.
> >
> > Ale
Alex Martelli wrote:
> Carl Banks <[EMAIL PROTECTED]> wrote:
>...
>>> class better_list (list):
>>> tail = property(None, list.append)
>> This is an impressive, spiffy little class.
>
> Yes, nice use of property.
>
> Alex
I don't know, I usually see people considering that proper
Alex Martelli wrote:
> Carl Banks <[EMAIL PROTECTED]> wrote:
>...
> > > class better_list (list):
> > > tail = property(None, list.append)
> >
> > This is an impressive, spiffy little class.
>
> Yes, nice use of property.
>
> > growing_lists = foo,qux
> > while some_condition:
> >
Carl Banks <[EMAIL PROTECTED]> wrote:
...
> > class better_list (list):
> > tail = property(None, list.append)
>
> This is an impressive, spiffy little class.
Yes, nice use of property.
> growing_lists = foo,qux
> while some_condition:
> for (s,x) in zip(growing_list,calculate
Lonnie Princehouse wrote:
> Here's a curious hack I want to put up for discussion. I'm thinking of
> writing a PEP for it.
A minor library change wouldn' t need a PEP.
> Observation
> -
> I found myself using this construct for assembling multiple lists:
>
> foo = []
> qu
Lonnie Princehouse wrote:
> Here's a curious hack I want to put up for discussion. I'm thinking of
> writing a PEP for it.
>
> Observation
> -
> I found myself using this construct for assembling multiple lists:
>
> foo = []
> qux = []
>
> while some_condition:
>
Here's a curious hack I want to put up for discussion. I'm thinking of
writing a PEP for it.
Observation
-
I found myself using this construct for assembling multiple lists:
foo = []
qux = []
while some_condition:
a, b = calculate_something()
foo.append