Re: [IronPython] Static methods that look similar to instance methods?

2006-05-08 Thread Jonathan Jacobs
J. Merrill wrote: > In C# you could use Vector3.Unprojectbut that might not work in IP. > Have you tried it? I guess I neglected to mention the part where I explained what I was doing. :) Calling Vector3.Unproject (in an attempt to call the static method) results in a "None" return value

Re: [IronPython] Static methods that look similar to instance methods?

2006-05-08 Thread Simon Dahlbacka
I suppose the problem is that the following is valid (and even used) python codeC:\>pythonActivePython 2.3.2 Build 232 (ActiveState Corp.) based onPython 2.3.2 (#49, Nov 13 2003, 10:34:54) [MSC v.1200 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information.>>>

Re: [IronPython] Static methods that look similar to instance methods?

2006-05-08 Thread Jonathan Jacobs
Simon Dahlbacka wrote: > I suppose the problem is that the following is valid (and even used) > python code Quite right. > Btw, why do you need both a static and a non-static method with the same > name? Well, it's not my code, it's from the Managed DirectX API. -- Jonathan _

[IronPython] Compiler flags

2006-05-08 Thread Andrzej Krzywda
Hi all, It seems that IronPython doesn't deal correctly with compiler flags (8192 is the compiler flag for __future__.division). IronPython Beta 6 >>> exec(compile("print 2/3", "", "exec", 8192), {}) 0 CPython >>> exec(compile("print 2/3", "", "exec", 8192), {}) 0.6667 Andrzej Krzy

[IronPython] Ignoring dont_inherit compiler flag

2006-05-08 Thread Andrzej Krzywda
Hi, IronPython ignores the dont_inherit compiler flag: IronPython Beta 6: >>> from __future__ import division >>> exec(compile("print 2/3", "", "exec", 0, 1), {}) 0.6667 CPython: >>> from __future__ import division >>> exec(compile("print 2/3", "", "exec", 0, 1), {}) 0 Andrzej Kr

Re: [IronPython] Static methods that look similar to instance methods?

2006-05-08 Thread Martin Maly
IronPython uses the style of the call to determine which of the 2 methods it will prefer: Class.Method(instance, parameter) ... will prefer static method instance.Method(parameter) ... will prefer instance method So this should work. However, we made changes to the overload re

Re: [IronPython] Compiler flags

2006-05-08 Thread Martin Maly
A great bug, thanks! We'll fix it. Martin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andrzej Krzywda Sent: Monday, May 08, 2006 8:09 AM To: [email protected] Subject: [IronPython] Compiler flags Hi all, It seems that IronPython doesn't dea

Re: [IronPython] Ignoring dont_inherit compiler flag

2006-05-08 Thread Martin Maly
Thanks for the bug report! Martin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andrzej Krzywda Sent: Monday, May 08, 2006 8:09 AM To: [email protected] Subject: [IronPython] Ignoring dont_inherit compiler flag Hi, IronPython ignores the dont

[IronPython] Some incompatibilities with CPython

2006-05-08 Thread Žiga Seilnacht
Hello, while playing with the last version of IronPython (1.0.60420), I noticed the following bugs (the errors are given in comments, while the expected output is from a Python 2.4.3 and should be usable as doctest): - Classes (types) are missing a __class__ attribute: >>> class C(object)

[IronPython] CherryPy on IronPython up but not running

2006-05-08 Thread Predrag Radovic
Hello Seo, I tried to start CherryPy 2.1.0 on the Windows with .NET 2.0 runtime and IronPython 1.0 Beta 6. After tweaking here and there, adding few stub modules (like datetime, sha, zlib) and using your excellent socket.py replacement module, the most basic example (tut01_helloworld.py) works but

[IronPython] PEP 342 - Coroutines via Enhanced Generators

2006-05-08 Thread Josh Ritter
I really like Python 2.5's coroutines implemented via enhanced generator support. http://www.python.org/dev/peps/pep-0342 I am wondering if there is a timeline for IronPython to support them? IronPython looks great... coroutines and a Twisted reactor would be really fun :) Thanks, -Josh Ritte

Re: [IronPython] CherryPy on IronPython up but not running

2006-05-08 Thread Simon Dahlbacka
First major problem is that IronPython apparently doesn't support assigningattributes to (un)bounded methods. For example, AFAIR, you could expose a method in CherryPy, either by directly setting the attribute, or by using a decorator @exposed or somesuch. (It is however likely that the decorator a