dynamically extend classes

Daniel Berlin dan at cgsoftware.com
Sat Feb 19 20:04:12 CET 2000


I think so, but you need to rephrase so i can be sure.
If you are asking if you can dynamically add stuff to modules/classes, and
have other things be able to use it, the answer is yes.

On 19 Feb 2000, Matt Wette wrote:

> 
> Is there a way to dynamically extend classes in Python?
> 
> I'd like to be able to have sitecustomize.py import a module
> and add methods to a class so that later, when anohter modules
> imports this module and uses the class it sees the added methods.
> 
> Doable?
> 
> Matt





More information about the Python-list mailing list