Hello,

I have several different kinds of data tables, absolutely independent,
defined as in the tutorial
(http://pytables.github.com/usersguide/tutorials.html):


from tables import *

class SaltedPie(IsDescription):
   dough=Int64Col()
   baking=Float64Col()
   anchovy=Float32Col()

class SweetPie(IsDesctiption):
   dough=Int64Col()
   baking=Float64Col()
   apple=UInt32Col()


One, naively, saw the repetition and would want to do something like:

class Pie(IsDescription):  # All kind of pies
   dough=Int64Col()
   baking=Float64Col()


class SaltedPie(Pie):
   anchovy=Float32Col()

class SweetPie(Pie):
   apple=UInt32Col()


but, when I try to set 'dough', I get:

KeyError: 'no such column: dough'


Of course, my approach is not correct. Is there a valid way of doing it?


Thanks.

Best regards,

David.

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Pytables-users mailing list
Pytables-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pytables-users

Reply via email to