Classes in Python

Wiebke Pätzold wiebke.paetzold at
Mon Aug 4 12:30:11 CEST 2003

Hi all!

Could somebody help me with a task?

import sys
import Mk4py
import re

db ="c:\\",1)
vw = db.view("people")

class PatternFilter:
    def _init_(self, pattern):
        self.pattern = re.compile(pattern)

    def _call_(self, row):
            nachname = row.Nachname
        except AttributeError:
            return 0
        return not None

vf = vw.filter(PatternFilter("Ge.*"))

for r in vf:
    print  vw[r.index].Nachname

I wrote this program, but it returns nothing. I can't find the error.
Can somebody help me? 
Can somebody tell me why the part:   "class PatternFilter:"  doesn't
return the expressions it should return?


More information about the Python-list mailing list