#5308: Removing __len__ for combinatorial classes
---------------------------+------------------------------------------------
 Reporter:  hivert         |       Owner:  hivert                             
     Type:  enhancement    |      Status:  new                                
 Priority:  major          |   Milestone:  sage-combinat                      
Component:  combinatorics  |    Keywords:  __len__, count, combinatorial class
---------------------------+------------------------------------------------
 After some discussion on sage-combinat-devel, it was decided that __len__
 should no be used to get the size of a combinatorial class because. Indeed
 the specifications of __len__ says that it has to return a plain python
 int, whereas we want to deal with huge and even infinite sets.
 Unfortunately due to __len__ being called by list / filter / map and maybe
 some other functions, it is not possible to issue a warning. So it was
 decided to simply remove it and issue an error, telling to call .count()
 instead.

 Some part of combinat has to be fixed accordingly.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5308>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" 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-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to