Re: [IronPython] New proposed exception model for IronPython

2005-12-16 Thread Dino Viehland
Title: [IronPython] New proposed exception model for IronPython Your proposal is essentially what we have today (we have a separate exception hierarchy that represents Python exceptions that is not correlated with the CLR exception hierarchy in any way).  This actually leads to *less* compa

Re: [IronPython] [Simpy-users] Simpy under IronPython 0.96

2005-12-16 Thread Stanislas Pinte
Selon Klaus Muller <[EMAIL PROTECTED]>: > Good work! What type does IronPython actually return for a generator? a generated type... not looking like a generator... Stan. > > Klaus Müller > > > -Original Message- > > From: Stanislas Pinte [mailto:[EMAIL PROTECTED] > > Sent: Frida

Re: [IronPython] [Simpy-users] Simpy under IronPython 0.96

2005-12-16 Thread Stanislas Pinte
Selon Klaus Muller <[EMAIL PROTECTED]>: > Stan, > Your assertion must be: > assert type(gentest()) == types.GeneratorType, > > _not_: > assert type(gentest) == types.GeneratorType. > > The call of a generator function generates a generator object. You are right, sorry!! there we are: [bin]> p

Re: [IronPython] [Simpy-users] Simpy under IronPython 0.96

2005-12-16 Thread Stanislas Pinte
> > if not (type(process) == types.GeneratorType): > raise Simerror("Fatal SimPy error: activating function which"+ >" is not a generator (contains no 'yield')") > > I suspect that the type system on IronPython is somehow different from that > in CPython. giv

Re: [IronPython] [Simpy-users] Simpy under IronPython 0.96

2005-12-16 Thread Stanislas Pinte
I think I have the first idea why the tests are failing: [bin]> ./IronPythonConsole.exe IronPython 0.9.6 on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> def testgenerator(): .. for i in range(0,10): .. yield i .. >>> testgenerator >>> type(testge

[IronPython] Simpy under IronPython 0.96

2005-12-16 Thread Stanislas Pinte
Hello, I am trying to start unit testing Simpy under IronPython, and make a state of current affairs... 1: I had to comment out all the from __future__ import statements. 2: I had to copy the following standard CPython modules in IronPythonConsole.exe directory: [bin]> ls *.py bisect.py* n

[IronPython] Exec Question

2005-12-16 Thread Tibor Berkovits
Tanks for the clarification, Martin. As my planned application depends essentially on dynamic code execution at run-time, any information you may have as to priority and expected release for this bug fix would be appreciated. If you have a patch that I could apply to the sources, while waiting fo

Re: [IronPython] New proposed exception model for IronPython

2005-12-16 Thread Thane
Title: [IronPython] New proposed exception model for IronPython I like this suggestion for its simplicity and consistency.  Here are two more cases: (1) Exceptions generated from code where no libraries are explicitly used.  Here CPython (running the script) creates a Python exception, an