#6097: [with patch, needs review] Implements a mantra for declaring abstract
methods
-------------------------+--------------------------------------------------
 Reporter:  nthiery      |       Owner:  nthiery         
     Type:  enhancement  |      Status:  assigned        
 Priority:  major        |   Milestone:  sage-4.1        
Component:  misc         |    Keywords:  abstract methods
 Reviewer:               |      Author:  nthiery         
   Merged:               |  
-------------------------+--------------------------------------------------

Comment(by saliola):

 Here is a second opinion.

 I really, really like the idea of adding such a decorator! And for the
 record, under normal circumstances, I would have asked for a full design
 discussion to take place on sage-devel since I share many of the above
 concerns and because I think that there are many subtle design issues
 that need to be addressed. (We'll have to have that discussion later,
 it seems.) However, in light of the decision to get the category theory
 code into Sage quickly, I am going to reluctantly suggest it be
 included in Sage as is.

 Here is a list of things that I don't like (most have been mentioned
 above):

  - raising {{{NotImplementedError}}} when an abstract method is accessed
  - the error message is not useful
  - returning {{{NotImplemented}}} for an optional abstract class
  - can't access the documentation for an abstract method
  - that {{{hasattr(x, 'my_method')}}} returns False for abstract methods
    and True for optional abstract methods
  - can't determine what the undefined abstract methods of an object are

 None of these are strong reasons against inclusion, I guess, since it
 might be just a matter of opinion, or that I haven't thought enough about
 the subtleties.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6097#comment:15>
Sage <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to