[IronPython] dll

Curt Hagenlocher curt at hagenlocher.org
Sat Sep 11 02:40:55 CEST 2004

"Garth T Kidd" <garth at deadlybloodyserious.com> writes:

> 	import System
> 	def foo(a, b):
> 		return "%s: %d" % (a, b)
> 	my_func.__CLRdetails__ = (System.String, System.Int64,
> System.String)

Does this syntax work in Python 2.3?  It doesn't currently work
in IronPython (hereafter, "FePy"), because the function object
doesn't allow assignment to arbitrary slots.

The question is, at what point does FePy actually emit the foo
function into the assembly?  Is it just the assignment to the
magic member?  That seems problematic.  Maybe you should have
to call a function like "CLR.Publish(foo)".

Other interop issues:
What class will global functions be a member of?
How will the namespace of the assembly be controlled?
Does it make sense that 1 FePy source file = 1 assembly, or should
there be a way to combine them?

Curt Hagenlocher
curt at hagenlocher.org

More information about the Ironpython-users mailing list