On Thursday 09 October 2008, Robert Bradshaw wrote:
> {{{
> %cython
> cdef class MyClass:
>      def __pow__(base, exp, dummy):
>          print "base", base, "exp", exp
>      def __str__(self):
>          return "MyClass"
> ///
> }}}
>
> sage: a = MyClass()
> sage: a^5
> base MyClass exp 5
> sage: "foo"^a
> base foo exp MyClass
>
> Strange but true.

wow I'm speech-less. Thanks for explaining.

Cheers,
Martin


-- 
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_www: http://www.informatik.uni-bremen.de/~malb
_jab: [EMAIL PROTECTED]


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to