#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.0.2      
Component:  misc         |    Keywords:  abstract methods
 Reviewer:               |      Author:  nthiery         
   Merged:               |  
-------------------------+--------------------------------------------------

Comment(by nthiery):

 Replying to [comment:11 ncalexan]:
 > >  - Instantiating an instance of an abstract class (which should not be
 permitted in the first place)
 >
 > Why not make __init__ (or __new__) raise NotImplementedError?

 Because abstract methods are perfectly valid in an abstract class.
 Actually, the user will want to use introspection to query for their doc,
 ...

 > >  - Instantiating an instance of a concrete class which does not
 implement all the mandatory abstract methods of it super class
 > >  - Or shooting in your own foot, and creating the abstract_method
 yourself, as in the doctest.
 >
 > These two can never be prevented against.  So I'm more okay with this
 than I was.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6097#comment:12>
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