Hi Nicolas,

> I am trying to finalise the module enumerating integer vectors modulo
> the action of a permutation group. In order to benefit as much as I can
> of the useful features already available, I was converting my integer
> vectors in nice ClonableIntArray instead of simple python lists.
> 
> I just found a micro incompatibility between ClonableIntArray and
> Parent. Here is a minimal example:
> 
> *********************************************************
> sage: class Myparent(Parent):
> ....:     class Element(ClonableIntArray):
> ....:         def check(self):
> ....:             pass
> ....:         
> sage: B = Myparent()
> sage: B.element_class(B, [0,0,0])
> [0, 0, 0]
> sage: B.element_class(parent=B, [0,0,0])
> ------------------------------------------------------------
>    File "<ipython console>", line 1
> SyntaxError: non-keyword arg after keyword arg (<ipython console>, line
> 1)

This has nothing to do neither with Parent or ClonableIntArray. Python's
syntax of function call forbid non keyword arg after keyword arg.

sage: def fun(a, b):
....:     pass
sage: fun (a=1, 2)
------------------------------------------------------------
   File "<ipython console>", line 1
SyntaxError: non-keyword arg after keyword arg (<ipython console>, line 1)

Also I can't reproduce you behavior:

----------------------------------------------------------------------
| Sage Version 4.7.1, Release Date: 2011-08-11                       |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
sage: class MyParent(Parent):
....:     class Element(ClonableIntArray):
....:         def check(self):
....:             pass
....:         
sage: B = MyParent()
sage: B([0,0,0])
---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)

/home/florent/<ipython console> in <module>()

/home/florent/src/Sage/sage/local/lib/python2.6/site-packages/sage/structure/parent.so
 in sage.structure.parent.Parent.__call__ (sage/structure/parent.c:6915)()

NotImplementedError: 

Which version of sage are you using ?


Cheers,

Florent

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.

Reply via email to