implementing property in pyrex?
Mike Rovner
mike at bindkey.com
Wed Mar 26 21:59:31 EST 2003
Hi all,
I wonder how to implement property in Pyrex.
I have getX and setX (C) functions and want to use them for implementing X
property.
If it was pure Python it's easy:
class A:
def getX(self): return 0
def setX(self,a): pass
X = property(getX,setX)
My first impression is to deal with metaclasses.
Pyrex has __get__ and __set__ but I'm dumb enough to use it.
Metaclasses still drive me mad.
Any help and examples are greatly appreciated.
Mike
More information about the Python-list
mailing list