From: Ivan V. i B. <iv...@ca...> - 2005-01-27 09:39:52
|
On Thu, Jan 27, 2005 at 10:16:50AM +0100, Ivan Vilata i Balaguer wrote: > def _f_registerNode(cls, nodeClass): [...] - createNode.__name__ =3D methodName + try: + createNode.__name__ =3D methodName + except TypeError: + pass # Python < 2.4 does not support changing __name__ >=20 > # Add the new method to the class. > setattr(cls, methodName, createNode) > _f_registerNode =3D classmethod(_f_registerNode) [...] --=20 Ivan Vilata i Balaguer >qo< http://www.carabos.com/ C=E1rabos Coop. V. V V Enjoy Data "" |