Works, thank you

On 10 Jul 2008, at 17:56, Dino Viehland <[EMAIL PROTECTED]> wrote:

This is 1.x, correct? You should implement the ICodeFormattable interface. That is also present in 2.0 but in 2.0 it’s no longer re quired that you implement it for it to work, you can just define a m ethod named __repr__.



From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] ] On Behalf Of Kamil Dworakowski
Sent: Thursday, July 10, 2008 9:53 AM
To: Discussion of IronPython
Subject: [IronPython] repr on c# class



I need to define repr method in c#, for use in IronPython. I tried:

       [PythonName("repr")]
        public static object Repr(object o) {
            return o.ToString();
        }


which didn't work. Is there a way without subclassing in Python?

--
Kamil

_______________________________________________
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