| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
We return tuple of name, txt, and locals for each fn. I added including a striped fn name (no `__`) so that dataclass_return_type can be unique for each fn. Modified the exec section to join the locals back together, and call them all under one __create_fn__
Don't need globals for each now. Wait to call _recursive_repr on _repr_fn until later
You may want to do something different here. Essentially I ended up inlining the logic (similar to how you do order defs), since we won't be calling the completed fn like before.
|
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
Sorry, something went wrong.
|
When I have more time this coming week I’ll figure out how to run test_dataclasses.py locally and see if/what I’ve messed up. |
Sorry, something went wrong.
|
Closing this as @ericvsmith has a much better refactored version |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
As mentioned in the gh issue, this is my attempt to combine the various exec calls (init, repr, eq, etc) into one, resulting in a increasing speedup with each additional exec call avoided. Around 1.1-1.22 speedup.
I don't expect this to be taken as-is. Mainly wanted to get something up so @ericvsmith has something cleaned up to look at.