Boost logo

Boost-Commit :

From: joel_at_[hidden]
Date: 2008-04-15 23:07:12


Author: djowel
Date: 2008-04-15 23:07:11 EDT (Tue, 15 Apr 2008)
New Revision: 44450
URL: http://svn.boost.org/trac/boost/changeset/44450

Log:
Andreas indexing suite patch
Text files modified:
   trunk/libs/python/test/vector_indexing_suite.py | 13 +++++++++++++
   1 files changed, 13 insertions(+), 0 deletions(-)

Modified: trunk/libs/python/test/vector_indexing_suite.py
==============================================================================
--- trunk/libs/python/test/vector_indexing_suite.py (original)
+++ trunk/libs/python/test/vector_indexing_suite.py 2008-04-15 23:07:11 EDT (Tue, 15 Apr 2008)
@@ -322,6 +322,19 @@
 [ a b c d e f g h i j ]
 
 #####################################################################
+# extend using a generator expression
+#####################################################################
+>>> v[:] = ['a','b','c','d','e'] # reset again
+>>> def generator():
+... addlist = ['f','g','h','i','j']
+... for i in addlist:
+... if i != 'g':
+... yield i
+>>> v.extend(generator())
+>>> print_xvec(v)
+[ a b c d e f h i j ]
+
+#####################################################################
 # vector of strings
 #####################################################################
>>> sv = StringVec()


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk