[cairo] pycairo subclass

Solerman Kaplon solerman at wonder.com.br
Wed Dec 12 03:02:07 PST 2007


Steven Chaplin escreveu:
> One way to write the Python bindings for cairo would be as a single
> long list of module functions - this would be the most accurate
> representation of the underlying C library. Pycairo (and most other
> cairo language bindings?) instead chose to implement the bindings using
> Context, Surface, Pattern, etc classes.
> An advantage is that the classes organise cairo into groups of similar
> functions.
> A disadvantage is that creates an illusion that cairo is object
> oriented library, and people are then tempted to create subclasses to
> override cairo methods. When in fact there are no methods to
> override, just cairo functions which can't be overridden.
>   

I lost the first part of the thread, so if nobody asked yet, can the 
classe be marked as final in python or some language-equivalent construct?

Solerman


More information about the cairo mailing list