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
Thanks for the issue! I think it's a duplicate of #2529 . Can you confirm? If yes, I believe this issue can be closed and we'll keep #2529 opened as it's a more general issue of the relationship between the compiler and the stdlib.
Thanks for the issue! I think it's a duplicate of #2529 . Can you confirm? If yes, I believe this issue can be closed and we'll keep #2529 opened as it's a more general issue of the relationship between the compiler and the stdlib.
I think they are different issues. The example in #2529 is conditional on the fact that someone, by mistake, imports now() into any of the builtin files. However, the random module is always imported automatically, even without user changing the builtin files.
Where is the problem?
https://docs.modular.com/mojo/stdlib/random/random/
What can we do better?
According to the official documentation, the
random
module needs to be imported before use.But the following code work without error:
I would prefer to make the module to be not imported by default, being consistent with the documentation, and makes the naming space cleaner.
Anything else?
No response
The text was updated successfully, but these errors were encountered: