Prothon is switching to the .NET platform
Christopher T King
squirrel at WPI.EDU
Tue Aug 10 15:34:13 EDT 2004
On Fri, 6 Aug 2004, John Roth wrote:
> The place where this gets really ugly is inserting functions
> into the instances. They have to be created at the module
> level, and then inserted into the instance by a module level
> function (somewhat similar to the way classmethod,
> staticmethod and property work).
Oh, I wouldn't even attempt that until Python supported
"def object.method():" syntax (like Prothon does). Using my derive class,
you could acheieve a similar effect though:
class my_derived_class(derive):
def some_new_function(self):
<do stuff>
my_derived_object = my_derived_class(my_prototype_object)
You aren't able to insert function definitions after the derived object is
created using this method (something I imag, but most function
definitions are premeditated anyways.
More information about the Python-list
mailing list