#18032: Broken copy, plot in sandpile
-------------------------------------+-------------------------------------
Reporter: vbraun | Owner:
Type: defect | Status: needs_work
Priority: major | Milestone: sage-6.6
Component: graph theory | Resolution:
Keywords: sd66 | Merged in:
Authors: Peter Wicks | Reviewers: Nathann Cohen
Stringfield, Volker Braun | Work issues:
Report Upstream: N/A | Commit:
Branch: | c500bfa13492c6c51ea52a5b9c0b91fe7b47806a
u/vbraun/ticket/18032 | Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by ncohen):
> In other words I also have to override `copy` in addition to `__copy__`.
How very convenient. This is why Peter originally factored out the
`self.__class__` call inside `__copy__`, to provide a hook to override
this call. It is all a logical consequence of having `__copy__` do non-
copy stuff...
The same would have happened with any other function. If a class B
inherits from A but B.f has fewer arguments than A.f, then of course
something is going to break.
Now, if you look at `Sandpile.<tab>` and most methods do not make sense to
you, then perhaps `Sandpile` should not inherit from `Graph` but merely
have a `._graph` variable.
Nathann
--
Ticket URL: <http://trac.sagemath.org/ticket/18032#comment:23>
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.
For more options, visit https://groups.google.com/d/optout.