Hey Simon,
   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 which doesn't make sense there and caused exceptions to be 
raised (at least, that's what I remember, it's been awhile since I did 
that). I may be superflous for Partitions_all...

Best,
Travis

On Monday, March 4, 2013 12:34:41 PM UTC-5, Simon King wrote:
>
> Hi! 
>
> In sage.combinat.partition (at least after 13605), there are several 
> __classcall_private__ methods of the following stile: 
>
> class Partitions_all(Partitions): 
>     @staticmethod 
>     def __classcall_private__(cls): 
>         return super(Partitions_all, cls).__classcall__(cls) 
>
> Isn't such a __classcall_private__ method totally useless? 
>
> Namely, a __classcall_private__ method is only called on those classes 
> that have it in their dictionary---in particular, the private classcall 
> will *not* be called on sub-classes. 
>
> In other words, the fact that Partitions does some preprocessing in a 
> __classcall_private__ method does absolutely not matter for 
> Partitions_all. 
>
> Or what was the rationale for introducing these and other 
> __classcall_private__ methods that just call __classcall__ (which would 
> be called anyway)? 
>
> 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.


Reply via email to