[sage-devel] Wrappers for Integer and RealNumber types

2008-07-11 Thread David Bate
Hello, I am a beginner to sage-devel, but I have done a search and nothing like this came up, although I believe it should be a newbie question. I have a class, my_class say derived from float, that I want to put into sage so that one can type 3*my_instance on the command prompt and something sen

[sage-devel] Re: Wrappers for Integer and RealNumber types

2008-07-11 Thread David Bate
OK, thank you both. I will have anther look on Monday. David. On Jul 11, 5:22 pm, Robert Bradshaw <[EMAIL PROTECTED]> wrote: > On Jul 11, 2008, at 7:19 AM, David Bate wrote: > > > > > Hello, > > I am a beginner to sage-devel, but I have done a search and nothing &

[sage-devel] Re: Wrappers for Integer and RealNumber types

2008-07-14 Thread David Bate
Dear Mike, I have mul and rmul in my class definition. This all works fine in python, but it fails when using sage integers/floats. If I call sage: a = MyFloat(2) sage: 3*a by adding some extra code, I see that MyFloat.__mul__(self,other) is called, and in fact the type of both self and other is