#12894: Add classcall setter in ClasscallMetaclass
--------------------------------------------------+-------------------------
       Reporter:  nthiery                         |         Owner:  jason       
  
           Type:  enhancement                     |        Status:  
needs_review  
       Priority:  major                           |     Milestone:  sage-5.9    
  
      Component:  misc                            |    Resolution:              
  
       Keywords:  classcall UniqueRepresentation  |   Work issues:              
  
Report Upstream:  N/A                             |     Reviewers:  Florent 
Hivert
        Authors:  Nicolas M. ThiƩry               |     Merged in:              
  
   Dependencies:                                  |      Stopgaps:              
  
--------------------------------------------------+-------------------------

Comment (by nthiery):

 Replying to [comment:6 hivert]:
 > Replying to [comment:5 nthiery]:
 > > Oops, I let that ticket die, whereas I need it soon in Sage for the
 > > functorial constructions. Thanks for the reminder!
 > >
 > > If the property approach can be made to work, it sounds like the one
 > > that encapsulates best the details of the caching of the resolution of
 > > classcall. So I vote for it. Does it look feasible?
 >
 > See:
 http://docs.cython.org/src/userguide/extension_types.html#properties
 >
 > We just need to check that we have a sufficiently recent Cython in Sage
 and
 > that this doesn't induce some unacceptable overhead.

 I just looked at this, and it seems we can't make this approach work:
 Indeed, even if we define __classcall__ as a property in
 ClasscallMetaclass, any class C which will implement its own
 __classcall__ will overwrite the property. But then,
 C.__classcall__ = ... won't work ...

 So at this point I'd go with just the _set_classcall approach, unless you
 see a way out.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12894#comment:7>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to