Re: [IronPython] repr() results with uint, etc.

2009-02-07 Thread Michael Foord
for William). Michael Michael Foord -Original Message- From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of Curt Hagenlocher Sent: Friday, February 06, 2009 9:36 PM To: Discussion of IronPython Subject: Re: [IronPython] repr() results with uint, etc

Re: [IronPython] repr() results with uint, etc.

2009-02-07 Thread Jeff Slutter
I totally agree that it should be done the right way - I didn't know what the right way was. CodePlex issue has been opened: 21040 Thanks! Dino Viehland wrote: And the correct change to the source code would be adding __repr__ methods to the various *Ops types (Int16Ops, UInt16Ops, etc...)

Re: [IronPython] repr() results with uint, etc.

2009-02-07 Thread Dino Viehland
...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of Michael Foord Sent: Saturday, February 07, 2009 6:04 AM To: Discussion of IronPython Subject: Re: [IronPython] repr() results with uint, etc. Dino Viehland wrote: And the correct change to the source code would be adding

[IronPython] repr() results with uint, etc.

2009-02-06 Thread Jeff Slutter
I have functions (in C#) that return results as everything from byte, sbyte, System.UInt16, int, uint, float, etc. If I use repr() on the returned value within IP2.0 only bool, int, int64, float, double and string types print out a nice value using repr. The other types (byte, char, sbyte,

Re: [IronPython] repr() results with uint, etc.

2009-02-06 Thread Dino Viehland
...@lists.ironpython.com] On Behalf Of Jeff Slutter Sent: Friday, February 06, 2009 8:48 PM To: Discussion of IronPython Subject: [IronPython] repr() results with uint, etc. I have functions (in C#) that return results as everything from byte, sbyte, System.UInt16, int, uint, float, etc. If I use

Re: [IronPython] repr() results with uint, etc.

2009-02-06 Thread Jeff Slutter
Ok, looking at the source, I see the issue in: public static string Repr(CodeContext/*!*/ context, object o) Is it safe to add these types in to there like: if ((s = o as string) != null) return StringOps.__repr__(s); if (o is int) return Int32Ops.__repr__((int)o);

Re: [IronPython] repr() results with uint, etc.

2009-02-06 Thread Dino Viehland
] repr() results with uint, etc. On Fri, Feb 6, 2009 at 9:32 PM, Jeff Slutter jslut...@reactorzero.com wrote: Ok, looking at the source, I see the issue in: public static string Repr(CodeContext/*!*/ context, object o) Is it safe to add these types in to there like: if ((s = o