[cairo] pycairo subclass
Behdad Esfahbod
behdad at behdad.org
Wed Dec 12 07:35:06 PST 2007
On Wed, 2007-12-12 at 05:31 -0500, Steven Chaplin wrote:
>
> I think, in general, that since Python has nice support for classes,
> there can be a tendency to want to subclass everything, even when
> subclassing is not necessary.
> For cairo.Context is does seem reasonable to want to create a
> subclass to add new drawing methods. So future versions of pycairo
> will allow subclassing of cairo.Context.
Now that you say it, I needed to do that in slippy too. The way I ended
up emulating it of course was:
def __getattr__ (self, arg):
return getattr (self.cr, arg)
--
behdad
http://behdad.org/
...very few phenomena can pull someone out of Deep Hack Mode, with two
noted exceptions: being struck by lightning, or worse, your *computer*
being struck by lightning. -- Matt Welsh
More information about the cairo
mailing list