8000 Document RealIntervalField default printing configuration by user202729 · Pull Request #38997 · sagemath/sage · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Document RealIntervalField default printing configuration #38997

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

user202729
Copy link
Contributor
@user202729 user202729 commented Nov 18, 2024

As in the title.

Side note, is this actually a good idea? Maybe it was intended to be not modifiable…

But modifying it has a practical advantage, sometimes you cannot control these two option otherwise e.g. if you have a list of elements you may need to extract each element and call .str(...) on it.

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

⌛ Dependencies

Copy link

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

Copy link
Collaborator
@tscrim tscrim left a comment

Choose a reason for hiding this comment

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

LGTM.

@user202729
Copy link
Contributor Author

The problem with this idea is… if later we want to move it to be parent-specific (like sci_not at the moment), then we will need a long deprecation period.

And it isn't entirely clear how to deprecate this feature either. We can't detect when the user accesses or modifies that specific field — because there's no __getattr__/__setattr__ module-level available.

@tscrim
Copy link
Collaborator
tscrim commented Dec 13, 2024

IMO the sci_not should be a global option. It doesn't affect the fundamental behavior of the objects, just their printing. This extends to all options that control the printing of objects. (Really, these should be moved to the current GlobalOptions class.)

It's easy enough to deprecate the class input. For the module-level stuff, we could default it to None and in the _repr_, then we print the deprecation. It doesn't print it when it is accessed, but at least when it is used.

@vbraun vbraun merged commit a986672 into sagemath:develop Dec 15, 2024
23 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0