Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

some erroe fix #27

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

Open
temp382000 wants to merge 1 commit into ujjwalkarn:master
base: master
Choose a base branch
Loading
from temp382000:big-fix
Open

some erroe fix #27

temp382000 wants to merge 1 commit into ujjwalkarn:master from temp382000:big-fix

Conversation

Copy link

@temp382000 temp382000 commented Jun 1, 2025

error fix in basic_commands.py.

Copy link

MarkMoretto commented Jun 1, 2025 via email

Hi, Couple ideas: 1. Itself is one word. 2. Double-quotation marks? 3. How about tuples? Something like, a = "a", "b", "c", "d", "e", The above becomes an immutable tuple by the compiler. In general, tuples should perform a little better than lists, at least in terms of memory usage. 4. This is confusing. Why use x twice? Matrix = [[0 for x in range(5)] for x in range(5)] Use an underscore if the index isn't needed. Matrix = [[0 for _ in range(5)] for _ in range(5)] 5. It's okay to put comments above the expression being referred to. No need for inline comments in most places. No - print(Matrix[0][0]) # prints 1 Yes - # out: 1 print(Matrix[0][0]) 6. Good to check if exists first. Current - def column(matrix, i): return [row[i] for row in matrix] Suggested - def column(matrix, i): if len(matrix) == 0 or len(matrix[0]) >= i: return return [row[i] for row in matrix] Etc. Really, just a terrible file that could use a lot more improvement. Sorry if that comes across as rough as it's not a personal attack. Best, Mark M.
...
On Sun, Jun 1, 2025, 2:42 AM temp382000 ***@***.***> wrote: error fix in basic_commands.py. ------------------------------ You can view, comment on, or merge this pull request online at: #27 Commit Summary - 8452907 <8452907> some erroe fix File Changes (1 file <https://github.com/ujjwalkarn/DataSciencePython/pull/27/files>) - *M* basic_commands.py <https://github.com/ujjwalkarn/DataSciencePython/pull/27/files#diff-5e6cfe1c2dacb0bb9ba922163e6195eb3545dc5fe158f3e58470eca8afc0f289> (54) Patch Links: - https://github.com/ujjwalkarn/DataSciencePython/pull/27.patch - https://github.com/ujjwalkarn/DataSciencePython/pull/27.diff — Reply to this email directly, view it on GitHub <#27>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AF62TY3PUVIBPAXJ5Q3XVWT3BLDHTAVCNFSM6AAAAAB6K4VMS6VHI2DSMVQWIX3LMV43ASLTON2WKOZTGEYDMOJWGQYTOOI> . You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /