You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This discussion was converted from issue #2701 on April 02, 2024 16:46.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The API documentation for the Context.with_resource() method states
"Returns: Whatever
context_manager.__enter__()
returns."In the example code from the "Managing resources" section, the code looks like this:
And later:
For me ctx.obj is None after this call, which seems to be in line with the documentation of with_resource().
Is there a
return self
missing in the__enter__()
method, or am I missing something?Environment:
Beta Was this translation helpful? Give feedback.
All reactions