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

@ -200,7 +200,6 @@ namespace spot
const fnode* nth(unsigned i) const
{
assert(i < size());
if (i >= size())
throw std::runtime_error("access to non-existing child");
return children[i];