#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 ncalexan):

 Replying to [comment:12 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,
 ...

 This seems wrong to me.  __init__ is only called on instance creation.
 Raising NotImplementedError in instance creation just means you can't
 create an instance.  How does this have anything to do with abstract
 methods or introspection?

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