dahlia/sider — pull request #7 by Kroisse (2013-03-22 09:52:03+00:00)
Title: Replace calls with generators as a variadic args, when passing large data into the collection

The major purpose is to avoid . See also [this gist][1]. Here is some example:

```pycon
>>> def f(a):
... raise Exception
...
>>> def seq(*args):
... return args
...
>>> seq(*(f(i) for i in 'asdf'))
Traceback (most recent call last):
File "", line 1, in
File "", line 1, in
File "", line 1, in f
Exception
>>> def f(a):
... raise TypeError
...
>>> seq(*(f(i) for i in 'asdf'))
Traceback (most recent call last):
File "", line 1, in
TypeError: seq() argument after * must be a sequence, not generator
>>>
```

This pattern was occured in the collection's update method, like [this code][2].

As you can see, this bug is still in Python 3.3, even if this issue will be fixed in the near future, Python 2.x will not be fixed forever. So it should be avoided by hand.

[1]: https://gist.github.com/Kroisse/5211709
[2]: /dahlia/sider/blob/6c82f8bae7f357e2c116e34a6833b655aed89f68/sider/list.py#L274