Hi Travis, On 2013-03-04, Travis Scrimshaw <tsc...@ucdavis.edu> wrote: > Because the ABC Partitions has a __classcall_private__() which returns > the correct parent and is acting as a factory. This is applied to all of > its subclasses
No, certainly not. From the docs of sage.misc.classcall_metaclass: Another difference is that ``__classcall__`` is inherited by subclasses, which may be desirable, or not. If not, one should instead define the method ``__classcall_private__`` which will not be called for subclasses. Specifically, if a class ``cls`` defines both methods ``__classcall__`` and ``__classcall_private__`` then, for any subclass ``sub`` of ``cls``: - ``cls(<args>)`` will call ``cls.__classcall_private__(cls, <args>)`` - ``sub(<args>)`` will call ``cls.__classcall__(sub, <args>)`` I did not run the whole doc tests. But it is enough to keep the following __classcall_private__ methods in order to make the tests of sage.combinat.partition pass. These are: - Partition, which really does a lot of work - Partitions, which does even more work - Partitions_parts_in, Partitions_starting, Partitions_ending - OrderedPartitions, which has a default argument. There were 6 other __classcall_private__ methods, some of them sanitising input such as putting Integer(k) around an argument k, but I really don't see why this should be done, rather than using the correct argument type right away. Best regards, Simon -- You received this message because you are subscribed to the Google Groups "sage-combinat-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en. For more options, visit https://groups.google.com/groups/opt_out.