Opened 8 years ago
Closed 5 years ago
#12298 closed defect (fixed)
minor CallableSymbolicExpressionRing display bug.
Reported by:  gbe  Owned by:  gbe 

Priority:  trivial  Milestone:  sage6.5 
Component:  symbolics  Keywords:  beginner, sd35.5 
Cc:  kcrisman  Merged in:  
Authors:  Geoffrey Ehrman, Kannappan Sampath, Sergey Bykov  Reviewers:  Kannappan Sampath, KarlDieter Crisman, Jeroen Demeyer 
Report Upstream:  N/A  Work issues:  
Branch:  6deecf1 (Commits)  Commit:  6deecf1895185e4ae927ceb6d623e5bca66410b3 
Dependencies:  Stopgaps: 
Description
When a CallableSymbolicExpressionRing? is created with only one variable, arguments is still plural and an extra comma is printed.
Correct, #variable > 1:
sage: CallableSymbolicExpressionRing([var('q p')]) Callable function ring with arguments (q, p)
Incorrect:
sage: CallableSymbolicExpressionRing([var('q')]) Callable function ring with arguments (q,)
The extra comma, I suspect, is because the repr returns something like "... arguments (%s)" % variable_tuple. This is what would be expected of a singular tuple.
Attachments (2)
Change History (18)
comment:1 Changed 8 years ago by
 Cc gbe removed
Changed 8 years ago by
comment:2 Changed 8 years ago by
 Keywords sd35.5 added
 Status changed from new to needs_review
comment:3 Changed 8 years ago by
 Cc kcrisman added
comment:4 Changed 8 years ago by
 Reviewers set to KarlDieter Crisman
 Status changed from needs_review to needs_work
comment:5 Changed 7 years ago by
 Status changed from needs_work to needs_review
comment:6 followup: ↓ 7 Changed 7 years ago by
comment:7 in reply to: ↑ 6 Changed 7 years ago by
Replying to kcrisman: Hello!
Thanks. Given that you are making these changes, should we fix any other little changes like that and add this file to the reference manual? See e.g. here. Though perhaps that should be based off of #6495 rather than interfere with that very big patch...
We could sure do that. We'll have to find an appropriate place to add this. I'd be glad to hear your suggestion, but at the moment, I am inclined to add it just after sage/symbolic/function
(equivalently, just before sage/symbolic/integration/integral
).
comment:8 Changed 7 years ago by
 Reviewers changed from KarlDieter Crisman to Kannappan Sampath, KarlDieter Crisman
 Status changed from needs_review to needs_work
See patchbot result.
sage t force_lib devel/sage12298/sage/modules/free_module_element.pyx ********************************************************************** File "/scratch/sage5.8.beta4/devel/sage12298/sage/modules/free_module_element.pyx", line 3900: sage: w.base_ring() Expected: Callable function ring with arguments (x,) Got: Callable function ring with argument x **********************************************************************
Should be easy to fix. Maybe you can add this to the reference manual at the place you suggest, too.
Otherwise this is fine, though if you're already doing it you may want to switch to Python 3 string formatting  up to you.
comment:9 Changed 6 years ago by
 Milestone changed from sage5.11 to sage5.12
comment:10 Changed 6 years ago by
 Milestone changed from sage6.1 to sage6.2
comment:11 Changed 6 years ago by
 Milestone changed from sage6.2 to sage6.3
comment:12 Changed 5 years ago by
 Milestone changed from sage6.3 to sage6.4
comment:13 Changed 5 years ago by
 Branch set to u/captaintrunky/minor_callablesymbolicexpressionring_display_bug_
comment:14 Changed 5 years ago by
 Commit set to 6deecf1895185e4ae927ceb6d623e5bca66410b3
 Status changed from needs_work to needs_review
New commits:
6deecf1  Fixes a misspelling at src/sage/categories/pushout.py and the docstring test with CallableSymbolicExpressionRing

comment:15 Changed 5 years ago by
 Milestone changed from sage6.4 to sage6.5
 Reviewers changed from Kannappan Sampath, KarlDieter Crisman to Kannappan Sampath, KarlDieter Crisman, Jeroen Demeyer
 Status changed from needs_review to positive_review
comment:16 Changed 5 years ago by
 Branch changed from u/captaintrunky/minor_callablesymbolicexpressionring_display_bug_ to 6deecf1895185e4ae927ceb6d623e5bca66410b3
 Resolution set to fixed
 Status changed from positive_review to closed
This looks fine but needs doctests.