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

Make a copy of locals() before popping from it #10

Open
naclomi opened this issue Mar 31, 2022 · 0 comments
Open

Make a copy of locals() before popping from it #10

naclomi opened this issue Mar 31, 2022 · 0 comments

Comments

@naclomi
Copy link

naclomi commented Mar 31, 2022

In this method, we're effectively calling locals().pop("self"):

https://github.com/rafrisci/sports-book-manager/blob/master/sports_book_manager/book_scrape_class.py#L198

This should have the effect of removing self from the current scope, so we can't use it again (does the code on line 210 work?)

Either make a copy of locals() before modifying it (locals().copy()), or possibly refactor this method to use **kwargs instead. I think that would make the code much nicer :) --
https://www.pythontutorial.net/python-basics/python-kwargs/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant