The Python language doesn't support partial classes, but you can probably achieve something similar by using multiple inheritance. That is, put each function into a separate class and then create an aggregate class that derives from each of them.
>>> class A(object): ... def test1(self): ... print 'test1' ... >>> class B(object): ... def test2(self): ... print 'test2' ... >>> class C(A, B): ... def __init__(self): ... self.test1() ... self.test2() ... >>> C() test1 test2 <C object at 0x000000000000002B> >>> There are generally certain "gotchas" to look out for with multiple inheritance, but provided that you're not using the same method names across multiple base classes -- including special names like __init__ -- you shouldn't run into any of them. On Thu, Jun 12, 2008 at 7:29 PM, Michael Stephens <[EMAIL PROTECTED]> wrote: > Our company has a scripting/macro system. Functions are stored in a > database and at runtime we generate python classes. For a form we have > multiple functions declared. We want to use IronPython studio to emit the > python classes to a file to be debugged. Is it possible to build a partial > class so that we can have one file per function. > > file function324.py > partial class Form76: > def function324.py > > file function325.py > partial class Form76 > def function324.py > > file base325.py > #do not edit anything in this file! changes will not be saved! > > > Michael Stephens > > Electrical Engineering Graduate Student > University of Wyoming > [EMAIL PROTECTED] or [EMAIL PROTECTED] > _______________________________________________ > Users mailing list > [email protected] > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > >
_______________________________________________ Users mailing list [email protected] http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
