Since the above appears to be a very difficult question (:-), I'm going to 
add another one - which is actually mentioned in the thread title, but I 
somehow forgot to ask...

Suppose I have a class A with an __init__ method taking a single mandatory 
argument:

class A(SageObject):

    def __init__(self, a, b=None, c=None):

What I'd like to achieve is that A(a) yields a, if a is an instance of A.  
I have read a bit about unique representation and CachedRepresentation, 
etc., but what I really want to achieve here is, I hope, much simpler.

I don't want to use CachedRepresentation, since the arguments of __init__ 
would be expensive to cache.

Many thanks,

Martin

-- 
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