Florent Hivert wrote: > Dear William > >> I like s.cardinality() since that's what I've used often already all >> over in Sage. >> Do >> >> sage: search_src('cardinality') >> <hundreds of places in sage where this is used!> > > Arglll !!! I had this idea and issued an > > tomahawk-*ge-combinat/sage $ grep def\ cardinality\( **/*.py* | wc > 11 35 533 > > which was a pretty low number. For the record: > tomahawk-*ge-combinat/sage $ grep def\ cardinality\( **/*.py* > rings/integer_mod_ring.py: def cardinality(self): > rings/ring.pyx: def cardinality(self): > schemes/elliptic_curves/ell_finite_field.py: def cardinality(self, > algorithm='heuristic', extension_degree=1): > sets/primes.py: def cardinality(self): > sets/set.py: def cardinality(self): > sets/set.py: def cardinality(self): > sets/set.py: def cardinality(self): > sets/set.py: def cardinality(self): > sets/set.py: def cardinality(self): > sets/set.py: def cardinality(self): > structure/parent.pyx: def cardinality(self): > > Is there a standard policy about aliases like card/cardinality ?
I think in general, the definition goes with the most descriptive name (e.g., cardinality). Sometimes a shorter alias is then created to make typing easier (e.g., card). An example of this the adjacency matrix of a graph. We have g.adjacency_matrix, but we also have the shortcut g.am. If there is only one function name, then it is the more explicit name (e.g., cardinality) Jason --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---