Skip to content

Conversation

@penguinolog
Copy link
Contributor

  • IOError is OSError in python3
  • io.open -> open
  • return str() -> return '' directly
  • direct super() call
  • do not subclass object

* `IOError` is `OSError` in python3
* `io.open` -> `open`
* `return str()` -> `return ''` directly
* direct `super()` call
* do not subclass `object`
Copy link
Collaborator

@davidbrochart davidbrochart left a comment

Choose a reason for hiding this comment

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

You also made the following changes:

  • replace .format() with f-strings
  • replace set([1, 2]) with {1, 2}

Co-authored-by: David Brochart <david.brochart@gmail.com>
f" $> jupyter <app> --existing {connection_file}\n"
"or even just:\n"
" $> jupyter <app> --existing\n"
"if this is the most recent Jupyter kernel you have started.".format(
Copy link
Collaborator

Choose a reason for hiding this comment

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

You also need to remove .format(connection_file).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it was removed, like almost all other format calls in next commit

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks!

f-strings is faster, than `str().format`
@blink1073 blink1073 merged commit b7783dd into ipython:main Dec 22, 2021
@penguinolog penguinolog deleted the py2_artifacts branch December 22, 2021 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants