Skip to content
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

Use repr for __repr__ and str for __str__ Implementations #229

Open
popescu-v opened this issue Aug 8, 2024 · 0 comments
Open

Use repr for __repr__ and str for __str__ Implementations #229

popescu-v opened this issue Aug 8, 2024 · 0 comments
Assignees
Labels
Priority/1-Medium To do after P0 Status/ReadyForDev The issue is ready to be developed or to be investigated deeply Type/DevChore Repository maintainance, CI/CD or non user-facing refactorings

Comments

@popescu-v
Copy link
Collaborator

Description

Currently, str is used in the __repr__ implementations of some custom objects, such as Dataset and some concrete implementations of the DatasetTable abstract base class.

However, repr and str do not have the same semantics and are thus not interchangeable by default: repr is low-level and unambiguous, whereas str is readable but potentially ambiguous.

Questions/Ideas

  • Revisit all __repr__ and __str__ implementations in the code base and make sure the proper semantics are preserved when using the Python repr and str builtins therein.
    • Case when semantics should not be preserved should be clearly commented.
@popescu-v popescu-v added Status/ReadyForDev The issue is ready to be developed or to be investigated deeply Type/DevChore Repository maintainance, CI/CD or non user-facing refactorings Priority/1-Medium To do after P0 and removed Priority/1-Medium To do after P0 labels Aug 8, 2024
@folmos-at-orange folmos-at-orange added the Priority/1-Medium To do after P0 label Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority/1-Medium To do after P0 Status/ReadyForDev The issue is ready to be developed or to be investigated deeply Type/DevChore Repository maintainance, CI/CD or non user-facing refactorings
Projects
None yet
Development

No branches or pull requests

3 participants