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

Bring math, random and time symbols into global namespace #99

Merged
merged 3 commits into from
Nov 24, 2024

Conversation

keith-packard
Copy link
Owner

Get rid of the math., time. and random. prefixes so that these symbols are easier to use.

This computes pi with random numbers

Signed-off-by: Keith Packard <keithp@keithp.com>
Add '--global' parameters to snek-builtin.py to match namespaces from
builtin function names, removing those namespaces so that the names
appear in the global namespace. Use '--alias' to also leave the names
in their original namespace for compatibility with existing code.

By default, the math, time and random namespaces aliased.

Signed-off-by: Keith Packard <keithp@keithp.com>
Fix all of the code to remove math., time. and random.

Signed-off-by: Keith Packard <keithp@keithp.com>
@keith-packard keith-packard merged commit b8ff418 into main Nov 24, 2024
2 checks passed
@keith-packard keith-packard deleted the from-import branch November 24, 2024 00:45
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