apply for objects
Hahn S
shahn at kits.cs.vu.nl
Thu Jun 15 14:17:08 EDT 2000
Hello everyone,
I have a problem and i can't figure out how to solve it in Python.
I to call a method on an object with a uncertain number of keyword
parameters.
For example:
class TestHandler:
def start(self, **attrs):
print "%s %s" % (name, attrs)
def dispatch(self, style, attrs):
if style == 'begin':
apply(self.start, attrs)
Now this won't work, because the self.start doesn't have a __call__
property. Any ideas how to solve this?
The **attrs in start is necessary, because there is other code calling
this function.
Am i overlooking something?
Thank you for your assistance!
Sander Hahn
More information about the Python-list
mailing list