We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
9caf478
python3.11
#nop
Hi, guys. I come across one global variable that used in class method. I think using instance attribute would be better !
def show_data(self): show_list = [] for i in range(1, N + 1): ==> should using self.N instead of N ! show_list += [self.query(i, i)] print(show_list)
source
def show_data(self): show_list = [] for i in range(1, self.N + 1): show_list += [self.query(i, i)] print(show_list)
The text was updated successfully, but these errors were encountered:
fixes TheAlgorithms#11232 issue replaces global variable by instance …
52e274d
…variable
MannCode:TheAlgorithms#11232. Refactor show_data method to use instan…
55c1faa
…ce attribute self.N instead of global variable N for better encapsulation and readability.
Successfully merging a pull request may close this issue.
Repository commit
9caf478
Python version (python --version)
python3.11
Dependencies version (pip freeze)
#nop
Expected behavior
Hi, guys. I come across one global variable that used in class method. I think using instance attribute would be better !
source
Actual behavior
The text was updated successfully, but these errors were encountered: