[IronPython] Interaction with other CLR code

Curt Hagenlocher curt at hagenlocher.org
Thu Aug 26 19:26:55 CEST 2004


Some more thoughts on this topic.

Unresolved:
1. How to handle properties?  If we were to map properties in a
CLR interface onto Python properties, we wouldn't be able to
handle indexed properties.  Indexed properties could be handled
through get_PROPERTYNAME and set_PROPERTYNAME functions on the
Python objects.  Then, do you use a Python property to implement
a nonindexed CLR proprty and a Python function to implement
an indexed CLR property, or is this too inconsistent?

2. What should be done with out parameters?

> 1. Create a shim class per interface.  The classes can be cached,
> so that they only need to be emitted once per interface.

Actually, you might even be able to do better than that and
store these assemblies on disk in a well-defined place, meaning
that on subsequent runs you could skip the codegen phase.

> The usual way to wrap the
> object in an interface would be to call a system-defined function
> for that purpose.

I've got this code working now and will post it after some minor
cleanup.

--
Curt Hagenlocher
curt at hagenlocher.org



More information about the Ironpython-users mailing list