On Wed, Feb 25, 2009 at 2:43 PM, Florent Hivert <florent.hiv...@univ-rouen.fr> wrote: > We were going to use s.count() until someone pointed out than there is a > collision with a standard python methods for list. > > s.count(x) > return number of i‘s for which s[i] == x > > Other suggestion are: > - s.length() : this is more ore less coherent with data structures but > seems to me to be too far from the mathematical thinking; > - s.cardinality() : we don't like it because this is too long. Remember that > we will type it every two lines; > - s.card() is currently my favorite...
How about s.size()? I don't particularly like s.card(), because the abbreviation is too opaque -- it would be nice if somebody seeing the method for the first time has a good chance of guessing what it means. Carl --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---