Le mercredi 4 février 2015 15:18:26 UTC+1, Volker Braun a écrit :
>
> Of course nobody can stop you from setting the element's parent manually. 
> Though thats clearly not recommended.
>
> Existence of coercions, say, depend on the parent only so the two elements 
> better have the same interface.
>
> As for the "identity map" example, if that were a subclass then you would 
> also have to check that a map is the identity whenever you compose maps and 
> construct the subclass. From a performance point of view that is most 
> likely sub-optimal.
>
>
Well, probably this depends on the use case, i.e. if you compose maps more 
often than you use them to get images of elements of their domains. If the 
latter operation is performed, let's say, via some matrix multiplication, 
it is clear that having def __call__(x): return x is more efficient than 
multiplying by the identity matrix. 

Eric.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to