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

[bugfix] Fix the incorrect with-statement #972

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aaa123git
Copy link

You may want to enter multiple context managers in one with-statement.
However, with rng_context and fp8_context is equivalent to with fp8_context, because rng_context doesn't rewrite __and__ method.
The correct way is with rng_context, fp8_context: .

Ref: https://docs.python.org/3/reference/compound_stmts.html#the-with-statement

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.

1 participant