Re: [IronPython] Iron Python Library Usage

2005-08-15 Thread Jonathan Jacobs
Martin Maly wrote: It is not obvious how to approach this, but definitely our goal is to make sure that we stay true to the Python lanugage and its libraries and as I said, it is our focus from now on to make progress on the libraries and built-in modules etc. What about __future__ magic? -- J

Re: [IronPython] IronPython on .NET v1.1 (was Re: IronPython 0.9 released)

2005-08-06 Thread Jonathan Jacobs
Paul Sweeney wrote: Finally, on a personal level I have a licensed copy of VS 2003 at home, and again can't justify the cost of VS 2005 when it comes out. (Wife and two kids to support, sob, sob ;-) Microsoft do plan to offer the 2005 Express products for US$49 each (http://lab.msdn.microsoft.c

Re: [IronPython] Overloads

2005-08-03 Thread Jonathan Jacobs
Martin Maly wrote: the Random.Next is not a static method. You can either pass the instance as the first argument: Hi Martin, Yes, I figured that out a little while later. Too bad I had already made a fool of myself. ;-) However, I think your question brings up a valid point ... how do we

Re: [IronPython] Overloads

2005-08-03 Thread Jonathan Jacobs
Jonathan Jacobs wrote: > Hopefully I'm just being stupid about this, but I can't seem to get this > overload story to behave: Okay, now that I've had lunch and am fully awake, I realise I was being a clown. I first have to instantiate a System.Random instance, the bad arg

[IronPython] Overloads

2005-08-03 Thread Jonathan Jacobs
Hi, I'm pleased to see 0.9 is out and the thank you message. :-) Hopefully I'm just being stupid about this, but I can't seem to get this overload story to behave: >>> System.Random.Next >>> print System.Random.Next.__doc__ int Next() int Next(int, int) int Next(int) >>> print System.Random.Nex

[IronPython] Issues with "exec X in Y"

2005-07-23 Thread Jonathan Jacobs
Me again, I ran across a couple of issues using the above syntax. I usually use it when making use of "config" files which are just Python source files: config = {} exec file('config.py') in config del config['__builtins__'] 1.) Specifying locals or globals broke things. As far as I can

Re: [IronPython] Plans for overloads?

2005-07-20 Thread Jonathan Jacobs
Keith J. Farmer wrote: Illustrating my concern with indexers: delegate Foo DelegateType(); public static DelegateType this (Type type) { } public Foo() { } x = Foo[typeof(int)]() .. is ambiguous. You can't determine if you've called the constructor, or if you've called the static indexer, pass

Re: [IronPython] Plans for overloads?

2005-07-20 Thread Jonathan Jacobs
Keith J. Farmer wrote: I didn't see a second set of square brackets. Also, what if what you have is an indexer, in which case the parameter is supplied also with square brackets? Then you have a lot of square brackets? ;-) Of course it's not very pretty. Do you have a suggestion that addres

Re: [IronPython] Plans for overloads?

2005-07-19 Thread Jonathan Jacobs
Keith J. Farmer wrote: How would you specify: T4 Foo(T1, T3) T4 Foo() T4 Foo(T3) T4 Foo(T2, T3) T4 Foo(T1, T2, T3) One would expect the first set of []s to classify the generic type and the second set to specify the exact overload. This seems like the least complicated solution (to me, any

Re: [IronPython] Python extensions

2005-07-17 Thread Jonathan Jacobs
Keith J. Farmer wrote: You can -- at least in asp.net 2 Yes, it appears you can...however IronPython throws away exported types without a namespace. Not sure what the reason for this may be, I'd have thought that classes from an assembly without a namespace should just belong to the top-leve

[IronPython] Python extensions

2005-07-16 Thread Jonathan Jacobs
Hi, Long story short: I'd like to make use of the Python stdlib email-related modules (imaplib, poplib) but these require the use of the _sockets extension (_sockets.pyd), which has not been implemented in IronPython (yet). This got me thinking about extensions in IronPython, currently there

Re: [IronPython] Plans for overloads?

2005-07-15 Thread Jonathan Jacobs
Martin Maly wrote: The overloaded function resolution (when IronPython calls .Net) is currently being worked on. You probably read the original code in which IronPython chooses the first callable alternative. The new code does better finds out all methods that can be called and tries to choose th

[IronPython] Plans for overloads?

2005-07-15 Thread Jonathan Jacobs
Hi, I am curious as to how function-overloads plan on being handled in future versions of IronPython. -- Jonathan ___ users-ironpython.com mailing list users-ironpython.com@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.c

[IronPython] from X import (...)

2005-07-13 Thread Jonathan Jacobs
Hi, I've noticed that IronPython doesn't yet support the Python2.4 "tuple" syntax when using "from X import (...)", I'm sure this is probably somewhere on the list of "Python2.4 compatability stuff to do". I've attached a patch adding support for this. -- Jonathan diff -ru IronPython-0.7.6-ori

[IronPython] from X import Y brokenness

2005-07-05 Thread Jonathan Jacobs
Hi, Recently, I've run across a bit of a bug while importing things with the "from X import Y" syntax, when Y is anything but an an attribute of X that already exists. Demonstration: IronPython 0.7.6 on .NET 2.0.50215.44 Copyright (c) Microsoft Corporation. All rights reserved. >>> from foo im

[IronPython] ReflectedPackage issue

2005-07-01 Thread Jonathan Jacobs
Hi, I'd like to start off by saying that I'm not sure whether this is the preferred place to post patches. If not, you may want to start writing your reply now. Recently IronPython sparked my interest in using DirectX from Python, however I've run into a couple of issues. One of which I've been a