arek - in flumotion/trunk: . flumotion/test
flumotion-commit at lists.fluendo.com
flumotion-commit at lists.fluendo.com
Fri Jul 20 17:07:12 CEST 2007
Author: arek
Date: Fri Jul 20 17:07:10 2007
New Revision: 5336
Modified:
flumotion/trunk/ChangeLog
flumotion/trunk/flumotion/test/pond.py
Log:
* flumotion/test/pond.py (Pond.set_flow):
Don't use 9 lines of code where 1 is enough.
Modified: flumotion/trunk/ChangeLog
==============================================================================
--- flumotion/trunk/ChangeLog (original)
+++ flumotion/trunk/ChangeLog Fri Jul 20 17:07:10 2007
@@ -1,5 +1,10 @@
2007-07-20 Arek Korbik <arkadini at gmail.com>
+ * flumotion/test/pond.py (Pond.set_flow):
+ Don't use 9 lines of code where 1 is enough.
+
+2007-07-20 Arek Korbik <arkadini at gmail.com>
+
* flumotion/test/pond.py (ComponentWrapper.get_unique_name,
Pond.do_stop, Pond.stop_flow):
Don't use language elements not available in python2.3.
Modified: flumotion/trunk/flumotion/test/pond.py
==============================================================================
--- flumotion/trunk/flumotion/test/pond.py (original)
+++ flumotion/trunk/flumotion/test/pond.py Fri Jul 20 17:07:10 2007
@@ -211,16 +211,8 @@
if len(comp_chain) == 0:
return
- # given a sequence (a0, a1, a2, ..., aN-1, aN)
- # this generator produces: (a0, a1), (a1, a2), ..., (aN-1, aN)
- def pair_chain(seq):
- car = seq[0]
- for cdr in seq[1:]:
- yield car, cdr
- car = cdr
-
if auto_link:
- for c_src, c_sink in pair_chain(comp_chain):
+ for c_src, c_sink in zip(comp_chain[:-1], comp_chain[1:]):
if c_sink.auto_link:
c_src.feed(c_sink)
More information about the flumotion-commit
mailing list