from ._guessing_game import *
imports itself?
#2454
Unanswered
astrojuanlu
asked this question in
Q&A
Replies: 1 comment
-
(I reckon that this probably should have been asked in |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Maybe this is a trivial Python question, but today I was puzzled that the line
brings both the contents of
_guessing_game.so
but also a module object corresponding to_guessing_game.so
itself. This code:Gives this:
And yet, if one tries to do it explicitly, it doesn't work. This code:
Gives
My current mental model is "star imports work differently for extension modules", but I don't know if this is correct. Any pointers?
Beta Was this translation helpful? Give feedback.
All reactions