[Python-Dev] Class Methods

Christian Tanzer tanzer at swing.co.at
Sat Apr 28 07:08:56 EDT 2001


"Alex Martelli" <aleaxit at yahoo.com> wrote:

> class POINT(create_structure("POINT_BASE", names=("x", "y"), format="ii")):
>     def additional_method(self):
>         print "Have your cake and inherit it too"

Now that's a sick^H^H^H^Hcool idiom.

-- 
Christian Tanzer                                         tanzer at swing.co.at
Glasauergasse 32                                       Tel: +43 1 876 62 36
A-1130 Vienna, Austria                                 Fax: +43 1 877 66 92





More information about the Python-list mailing list