Hey Simon, 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 most likely messed something up when I was doing this the first time through...I had a pickling issue come up with number of arguments with the classcalls vs. __init__, but I think I solved that differently...
> > 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. > I was worried something like Partitions(3) would not be the same as Partitions(int(3)), but I've done some testing recently and realized that this didn't seem to be a problem. Could you send me the patch with your changes (since trac is currently down, we can't create the followup ticket)? Thanks, Travis -- 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.