Ask Your Question

passing options to superclass method

asked 2014-09-29 21:05:39 +0100

Hartmut Monien gravatar image

updated 2022-10-19 20:40:58 +0100

FrédéricC gravatar image

I would like to modify the plot code of a plot attribute in a derived class

class Foo(Bar):
     def plot(self, **options):
         super(Foo, self).plot(options)

This does not seem to work. What is the right way to pass the options?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2014-10-13 11:23:44 +0100

vdelecroix gravatar image

Would be better to use

super(Foo, self).plot(**options)


edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2014-09-29 21:05:39 +0100

Seen: 143 times

Last updated: Oct 13 '14