Partial classes
Sanjay
skpatel20 at hotmail.com
Wed Jul 19 02:10:50 EDT 2006
Hi All,
Not being able to figure out how are partial classes coded in Python.
Example: Suppose I have a code generator which generates part of a
business class, where as the custome part is to be written by me. In
ruby (or C#), I divide the code into two source files. Like this:
GeneratedPerson.rb
Class Person
.
.
.
End Class
HandcraftedPerson.rb
Class Person
.
.
.
End Class
The intrepretor adds the code in both to compose the class Person.
What is the equivalent in Python? Inheriting is a way, but is not
working in all scenerios.
Thanks
Sanjay
More information about the Python-list
mailing list