Dear Sebastien and Vincent,

> I like more something like this (_len_). We should also impose that
> the cardinality must be a SAGE Integer or +Infinity and this should be
> integrate in the core of SAGE.
> 
> 2009/2/26, Sébastien Labbé <sla...@gmail.com>:
> > Couldn't we define something like :
> >
> > def _len_(self):
> >     return ...
> >
> > that behave like we want as it is done for _str_ and _repr_ ?

I'm sorry for you folks doing combinatorics on words who likes len, length and
things like that, but a don't think then length(Z/2Z) or length(NN) has a
meaning for a standard mathematician. Worse, for various type of object it has
some meaning which is very different from it's size. For example, in the
context of group presented by generators and relations, the length is usually
the function which return the minimal length of a decomposition of an
element. In the context of module over a algebra this is the number of layer
in a certain filtration. Of course, it is always some kind of cardinality, but
I thing that in the context of standard mathematics, it is very confusing.

Now I don't really see a big difference in writing:
    cadinality(set)   or   card(set)   or   whatever(set)
which calls _cardinality_(self) or .... in the opposite of calling directly 
   set.cardinality()  or  set.card()   or  set.whatever()
   
Cheers,

Florent

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

Reply via email to