#12630: Add representations of quivers and quiver algebras to sage
-------------------------------------------+--------------------------------
Reporter: JStarx | Owner: AlexGhitza
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-5.10
Component: algebra | Resolution:
Keywords: algebra, quiver, module | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Jim Stark | Merged in:
Dependencies: #12412, #12413 | Stopgaps:
-------------------------------------------+--------------------------------
Comment (by SimonKing):
`Quiver_generic.__init__` provides a lot of different arguments, but it
seems that they can't be used with the `QuiverFactory`. I'll try to make
the factory more transparent with respect to keyword arguments.
It is nice that calling certain methods of `DiGraph` results in an
attribute error. But it would be even nicer if one would obtain the
attribute error ''before'' calling the method. This is how it could be
achieved:
{{{
sage: from sage.graphs.digraph import DiGraph
sage: class C(DiGraph):
....: @property
....: def _forbidden_attribute(self):
....: raise AttributeError
....: add_cycle = _forbidden_attribute
....: add_edge = _forbidden_attribute
....:
sage: c = C()
sage: c.add_<TAB> # tab completion of forbidden attributes works
c.add_cycle c.add_edge c.add_edges c.add_path
c.add_vertex c.add_vertices
# Note that the following is c.add_cycle, not c.add_cycle()
sage: c.add_cycle
---------------------------------------------------------------------------
AttributeError Traceback (most recent call
last)
<ipython-input-7-82cae30af75f> in <module>()
----> 1 c.add_cycle
<ipython-input-5-2839f68577a9> in _forbidden_attribute(self)
2 @property
3 def _forbidden_attribute(self):
----> 4 raise AttributeError
5 add_cycle = _forbidden_attribute
6 add_edge = _forbidden_attribute
AttributeError:
sage: hasattr(c, 'add_cycle')
False
sage: hasattr(c, 'add_edge')
False
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12630#comment:37>
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.