-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Refactor "repr" objects #3399
Comments
i do not have a strategy as of now the design flaws are mostly based in mixing output styling mechanisms with the representation mechanism in addition serialization capabilities are missing completely |
Maybe we want to pass around objects that implement an interface: |
deserialize cant work that way |
@RonnyPfannschmidt it seems you want a complete overhaul of the "repr" objects (which I agree could use a better name). Problem is that we 1) don't even know what the "overhaul" is and 2) we don't have the man power to even discuss it right now (it seems to me). The refactoring discussed here won't change what you see that's bad about the current design, but:
So I propose we aim to incremental improvement rather than stop everything on its tracks hoping for a perfect solution, which might never even happen. What do you think? |
as increment i propose adding an actual exception attribute to the reprs which is optional and planned for removal in the overhaul |
while reviewing what the std-lib currently has to offer, however statement range finding and other details may really want to use python 3.11 features for co_positions |
Follow up of #3361 (comment).
@RonnyPfannschmidt could you write down the strategy you have in mind to refactor the repr objects and what is the problem with their design currently?
cc @brianmaissy @whimboo
xref: #3343
The text was updated successfully, but these errors were encountered: