Skip to content

Conversation

@egull
Copy link
Contributor

@egull egull commented Dec 5, 2025

Hiroshi, could you please have a brief look that you approve?

Thanks!
Emanuel

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates tutorials/tutorial1/gen_Uijkl.py from Python 2 to Python 3 syntax. The changes modernize the code to be compatible with Python 3 by replacing deprecated Python 2 constructs with their Python 3 equivalents. However, this appears to be a partial migration as other Python files in the same tutorial directory (gen_hopping.py, gen_hyb.py, plot.py) still use Python 2 syntax.

Key changes:

  • Replaced all xrange() calls with range() (Python 3 equivalent)
  • Converted print >>f, ... statements to print(..., file=f) function calls

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

for k in range(nf):
if j==k:
print >>f, i, j, k, g_tau[i].real, g_tau[i].imag
print(i, j, k, g_tau[i].real, g_tau[i].imag,file=f)
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space before file=f parameter. Should be print(i, j, k, g_tau[i].real, g_tau[i].imag, file=f) with a space after the comma preceding file=f for consistency with PEP 8 style guidelines.

Copilot uses AI. Check for mistakes.
egull and others added 2 commits December 5, 2025 09:58
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

2 participants