Adding attribute to object
marco
marc.lentz at ctrceal.caisse-epargne.fr
Wed Dec 3 11:03:50 EST 2003
More information about the Python-list mailing list
Wed Dec 3 11:03:50 EST 2003
- Previous message (by thread): Adding attribute to object
- Next message (by thread): Adding attribute to object
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
hi I've got a class "myClass" ... and i CAN'T EXTENDS this class! But i can add NEW methods to "myClass", like that : method = new.instancemethod( myNewMethod , None, myClass) myClass.__dict__[method.__name__] = method i'd like to add NEW attributs to "myClass" ... i'm pretty sure it's possible (with "get/set-attr") ... but i don't know how to do that in fact, i'd like to wrap an newAttribut to an existingAttribut ... can anyone drop me 3 lines on how to do that ?
- Previous message (by thread): Adding attribute to object
- Next message (by thread): Adding attribute to object
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list