| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
restructuring & comments
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
| SOURCE = 3 | ||
| STRING = 3 |
There was a problem hiding this comment.
I guess, SOURCE will be removed soon?
Sorry, something went wrong.
There was a problem hiding this comment.
We should just remove SOURCE since we never released this enum.
Sorry, something went wrong.
There was a problem hiding this comment.
I wonder if the name change & doc changes should possible addressed by another PR
Sorry, something went wrong.
| SOURCE = 3 | ||
| STRING = 3 |
There was a problem hiding this comment.
We should just remove SOURCE since we never released this enum.
Sorry, something went wrong.
| localns, | ||
| type_params, | ||
| owner, | ||
| ) in unroll_cases(cases, locals()): |
There was a problem hiding this comment.
I'm not sure all this indirection makes the test cases better. It becomes harder to verify the tests behave as expected with so much logic between the definition of the tests and the actual tests.
Sorry, something went wrong.
There was a problem hiding this comment.
I share that sentiment. I did some reordering to bring the actual test and case definition closer together, but it does not reduce the overall code in that function.
So far I do not see a good way how to simplify it in a nice way. If you/anyone has suggestions on how to restructure / parts to remove I am open for it.
Sorry, something went wrong.
There was a problem hiding this comment.
I'd simply write explicit test cases for some important cases, instead of attempting to create an abstraction around them.
Sorry, something went wrong.
There was a problem hiding this comment.
Done, Yes I think that looks better now. Thank you.
Sorry, something went wrong.
See PEP 749
…rd_ref' into 3.14/evaluate_forward_ref
| Back | FazBrowse Home | New Git URL |
Backports evaluate_forward_ref from JelleZijlstra's PR python/cpython#119891 / PEP 749.
The most tricky part seems to be in recursive ForwardRefs, at least in my tests they worked better in 3.9 and but not in 3.8 and 3.10. If someone has some nice examples how to break it I gladly add them.
Limitation has been added to the docs.
Tests are also tested against cpython main python/cpython@079875e39