python: implement __getitem__ for formula

* wrap/python/spot_impl.i: Implement it.
* wrap/python/tests/ltlsimple.py: Test a for loop.
* src/ltlast/formula.hh: Remove superfluous assert().
This commit is contained in:
Alexandre Duret-Lutz 2015-09-27 20:36:07 +02:00
parent 5711d34489
commit 533268000d
3 changed files with 15 additions and 1 deletions

View file

@ -71,3 +71,6 @@ f5 = spot.formula.Xor(F, c)
del a, b, c, T, F, f1, f2, f4, f5
assert spot.fnode_instances_check()
#----------------------------------------------------------------------
assert str([x for x in spot.formula('a &b & c')]) == '[a, b, c]'