Hi,
I have the following C# code:
public class MyObject : IDynamicMetaObjectProvider {
int value;
public MyObject(int value) { this.value = value; }
static public int operator *(int left, MyObject right) { return left *
right.value; }
static public int operator *(MyObject left, i
pick up the
List version later in resolution via a .NET mapping than looking up
members by name. But you can define the integer overload for __getitem__
and forward it to the real implementation.
We could also consider just adding slicing support for List to IronPython
natively J We proba
IronPython] Magic methods on CLR types
If you want IronPython to recognize them you just need to create an assembly
w/ ExtensionTypeAttribute and have it point at the extended and extending
types. Then the assembly needs to be loaded into the ScriptRuntime using
ScriptRuntime.LoadAssembly.
We still need to figur
ports.
From: users-boun...@lists.ironpython.com
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Jeffrey Sax
Sent: Tuesday, December 01, 2009 5:27 PM
To: 'Discussion of IronPython'
Subject: [IronPython] Magic methods on CLR types
Is there a way to add magic methods like __r
type corresponding to the CLR type? If so, how?
3. If neither of these alternatives is possible, is there a third way?
Thanks!
Jeffrey Sax
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users
I got sympy 0.6.5 running *without* frames by commenting out some lines:
sympy\__init__.py: line 44
# evalf._create_evalf_table()
Sympy\utilities\__init__.py: lines 14 and 18:
# from source import source
# from runtests import test, doctest
There are two more anomalies I'd like to report:
1. P
Given the following C# code:
public class A {
public static A operator+(A a1, A a2) { return null; }
public static implicit operator A(int n) { return null; }
}
public class B : A {}
In C#, I can then write:
B b = new B();
A c = b + 1;
However, in IronPython I get:
>>> b = B()
>>> c = b
Thanks Michael & Dino,
That gets me a step further:
>>> from sympy import Symbol
Traceback (most recent call last):
File "", line 1, in
File "c:\Program Files
(x86)\Python26\Lib\site-packages\sympy\__init__.py", line 44, in c:\Program
Files (x86)\Python26\Lib\site-packages\sympy\__init__.py
According to the archives, some version of sympy worked on IP 1.x at some
point in the distant past. Now, with the latest version of both (sympy 0.6.5
on IronPython 2.6.B2), I get this:
PS C:\Program Files (x86)\IronPython 2.6> .\ipy.exe
IronPython 2.6 Beta 2 (2.6.0.20) on .NET 2.0.50727.4918
Type
nment.
Is this where the refactoring is headed?
Jeffrey Sax
Extreme Optimization
___
users mailing list
users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
10 matches
Mail list logo