#28 Table.__iter__ oddity when not calling Row.append().

closed
None
5
2005-06-20
2005-05-20
No

Given the following sample code::

import tables as t

class myDescr(t.IsDescription):
c1 = t.IntCol()
c2 = t.FloatCol()

h5f = t.openFile('t.h5', 'w')
tbl = h5f.createTable('/', 'test', myDescr)

row = tbl.row
row['c1'] = 1
row['c2'] = 1.0
row.append()
row['c1'] = 2
row['c2'] = 2.0
row.append()
tbl.flush()

row['c1'] = 3
row['c2'] = 3.0

for r in tbl:
print r

h5f.close()

the output of the program is::

(3, 3.0)
(0, 0.0)

when it should be::

(1, 1.0)
(2, 2.0)

It looks like a bug resetting some pointer in
``Row._initLoop()``.

Discussion

  • Francesc Altet

    Francesc Altet - 2005-06-20

    Logged In: YES
    user_id=249033

    As a consequence of supporting nested iterators, this
    has been solved.

     
  • Francesc Altet

    Francesc Altet - 2005-06-20
    • assigned_to: nobody --> falted
    • status: open --> closed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks