Opened 22 months ago
Closed 20 months ago
#24391 closed defect (fixed)
DynkinDiagram.marked_nodes doesn't work
Reported by: | vittucek | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-8.2 |
Component: | combinatorics | Keywords: | |
Cc: | sage-combinat, chapoton, nthiery | Merged in: | |
Authors: | Travis Scrimshaw | Reviewers: | Vít Tuček |
Report Upstream: | N/A | Work issues: | |
Branch: | 504f127 (Commits) | Commit: | 504f12773ecb7c21d9c97c5cab73b300b61ba9cd |
Dependencies: | Stopgaps: |
Description
D = DynkinDiagram("A3") D.marked_nodes([1,3])
returns
Traceback (most recent call last): File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1013, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "", line 1, in <module> File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_salvus.py", line 3596, in displayhook _system_sys_displayhook(obj) File "sage/structure/sage_object.pyx", line 237, in sage.structure.sage_object.SageObject.__repr__ (/ext/sage/sage-8.0/src/build/cythonized/sage/structure/sage_object.c:2642) result = repr_func() File "/ext/sage/sage-8.0/local/lib/python2.7/site-packages/sage/combinat/root_system/type_marked.py", line 165, in _repr_ return self._type._repr_(compact = compact)+" with nodes {} marked".format(self._marked_nodes) TypeError: _repr_() got an unexpected keyword argument 'compact'
Change History (7)
comment:1 Changed 22 months ago by
- Branch set to public/combinat/fix_repr_marked_dynkin_diagram-24391
- Commit set to 504f12773ecb7c21d9c97c5cab73b300b61ba9cd
- Status changed from new to needs_review
comment:2 Changed 21 months ago by
- Cc chapoton nthiery added
comment:3 Changed 20 months ago by
Why do you catch TypeError
exception?
comment:4 Changed 20 months ago by
Because that is what happens when you pass unexpected keyword arguments as noted in the ticket description. Admittedly, the proposed fix is a slight hack, but IIRC, there were some issues with adding a compact
argument to all possible inputs and this is not an unpythonic solution.
comment:5 Changed 20 months ago by
- Reviewers set to Vít Tuček
- Status changed from needs_review to positive_review
Oh yeah. Sorry. Long day.
comment:6 Changed 20 months ago by
No problem. Thanks for the review.
comment:7 Changed 20 months ago by
- Branch changed from public/combinat/fix_repr_marked_dynkin_diagram-24391 to 504f12773ecb7c21d9c97c5cab73b300b61ba9cd
- Resolution set to fixed
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
New commits:
Fixing _repr_ for marked types.