Hi Sébastien!

>    Couldn't we define something like :
> 
>    def _len_(self):
>        return ...
> 
>    that behave like we want as it is done for _str_ and _repr_ ?

That could be an option. But:

 - It can be confusing for the user to have two functions with almost
   the same name (__len__ / _len_) and subtle semantic difference.
   (for the record, I also find _str_/__str__ confusing).

 - We really want the function to appear in the automatic completion.
   (or alternatively that could be called via a standard function like
   len(...) had we been lucky enough to be able to use len).

 - len conveys more a computer science meaning rather than a
   mathematical meaning.

Cheers,
                                Nicolas
--
Nicolas M. Thiéry "Isil" <[email protected]>
http://Nicolas.Thiery.name/

--~--~---------~--~----~------------~-------~--~----~
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-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to