Skip to content

Fix oddity in formatting string inside get_coercion_model().analyse().#41828

Merged
vbraun merged 1 commit intosagemath:developfrom
emmanuelthome:fix-formatting-bug
Mar 22, 2026
Merged

Fix oddity in formatting string inside get_coercion_model().analyse().#41828
vbraun merged 1 commit intosagemath:developfrom
emmanuelthome:fix-formatting-bug

Conversation

@emmanuelthome
Copy link
Copy Markdown
Contributor

The trivial code below was choking on that particular line not converting all its arguments. It's indeed visibly wrong.

sage: from sage.structure.element import get_coercion_model
sage: get_coercion_model().analyse(int(1), int(1))
[...]
TypeError: not all arguments converted during string formatting

The trivial code below was choking on that particular line not
converting all its arguments. It's indeed visibly wrong.

```
sage: from sage.structure.element import get_coercion_model
sage: get_coercion_model().analyse(int(1), int(1))
[...]
TypeError: not all arguments converted during string formatting
```
Copy link
Copy Markdown
Contributor

@mantepse mantepse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@github-actions
Copy link
Copy Markdown

Documentation preview for this PR (built with commit 5b2c64d; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

vbraun pushed a commit to vbraun/sage that referenced this pull request Mar 21, 2026
sagemathgh-41828: Fix oddity in formatting string inside `get_coercion_model().analyse()`.
    
The trivial code below was choking on that particular line not
converting all its arguments. It's indeed visibly wrong.

```
sage: from sage.structure.element import get_coercion_model
sage: get_coercion_model().analyse(int(1), int(1))
[...]
TypeError: not all arguments converted during string formatting
```
    
URL: sagemath#41828
Reported by: Emmanuel Thomé
Reviewer(s): Martin Rubey
@vbraun vbraun merged commit b26da03 into sagemath:develop Mar 22, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants