#7976: Extends __classcall__ to control inheritance
---------------------------+------------------------------------------------
Reporter: hivert | Owner: hivert
Type: enhancement | Status: needs_work
Priority: major | Milestone:
Component: categories | Keywords: ClassCall, inheritance
Work_issues: | Author: Florent Hivert
Upstream: N/A | Reviewer: Nicolas M. Thiéry
Merged: |
---------------------------+------------------------------------------------
Changes (by nthiery):
* keywords: ClassCall inheritance => ClassCall, inheritance
* reviewer: => Nicolas M. Thiéry
* status: needs_review => needs_work
Comment:
Thanks Florent, and thanks for using this occasion to cleanup my code!
Can you fix the copyright dates? Mine should be 2009, and yours 2010
I like the idea of using Python's standard convention for private
attributes; on the other hand, I am a bit worried about emulating Python's
mechanism. In particular, we could eventually get in trouble with the
class name hacking we do for pickling:
{{{
sage: Sets.ParentMethods.__name__
'Sets.ParentMethods'
}}}
I haven't found a way to *use* Python mechanism. So instead, what about
using ``__classcall_private__``, and doing the test with
'__classcall_private__' in cls.__dict__?
(I also prefer ``private`` to ``no_inherit``).
Cheers,
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7976#comment:2>
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 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.