classes (table)

Alex Martelli aleax at aleax.it
Wed Aug 6 07:31:39 EDT 2003


Wiebke Pätzold wrote:
   ...
> import Mk4py

I'm not experienced in this package, so I'm not sure this will
work and can't test, but:

>     def __call__(self, row):
>         try:
>             nachname = row.Nachname

Just change this to

              whatever = getattr(row, self.attributeName)

Where self.attributeName can be any string, e.g. defaulting
to 'Nachname' if you wish, as set e.g. in __init__.


Alex





More information about the Python-list mailing list