You can pass a type object from Python directly to the function, and we'll 
convert it into the CLR type along the way.  Alternately you can import clr and 
then do clr.GetClrType(somePythonType).  For example you should be able to pass 
str, int, bool, etc... through and have it just work.

Generic functions are accessed from IronPython using indexers ([]) to specify 
the type.  So you can do:

foo.blah[int](3, 4)

or

foo.blah[str]("3","5")

and you can access generic types the same way.



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Bjorke
Sent: Wednesday, July 05, 2006 4:45 PM
To: Discussion of IronPython
Subject: [IronPython] Quick questions about connecting to other CLR languages

I'm writing in IP and trying to connect to code written in C# by other people

if they have a function wanting a typeof(something) argument, how can I pass 
that from IP?

if they have a templated function blah<t>() how will that appear in IP?
as multiple functions, or...?

thanks
KB

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may 
contain confidential information.  Any unauthorized review, use, disclosure or 
distribution is prohibited.  If you are not the intended recipient, please 
contact the sender by reply email and destroy all copies of the original 
message.
-----------------------------------------------------------------------------------
_______________________________________________
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

Reply via email to