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

The module pyteal.ast.int shadows the Python keyword int #28

Closed
fabrice102 opened this issue Oct 20, 2020 · 1 comment · Fixed by #29
Closed

The module pyteal.ast.int shadows the Python keyword int #28

fabrice102 opened this issue Oct 20, 2020 · 1 comment · Fixed by #29
Assignees
Labels
bug Something isn't working FDE
Milestone

Comments

@fabrice102
Copy link
Contributor

fabrice102 commented Oct 20, 2020

When importing pyteal by from pyteal import * (as in the documentation examples), the module pyteal.ast.int shadows the Python keyword int.

In particular, we have

$ python3 -c "from pyteal import *; print(int(5))"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
TypeError: 'module' object is not callable

while:

$ python3 -c "print(int(5))"
5

Requirements

Stop submodules from being exported, small change. They shouldn't be exported in the first place

Urgency

Could be a major blocker for some people and it's a simple change that we can just knock out.

@jasonpaulos
Copy link
Contributor

Great find, I will fix this and release a new patch version soon.

@jasonpaulos jasonpaulos self-assigned this Oct 20, 2020
@jasonpaulos jasonpaulos added FDE bug Something isn't working labels Oct 20, 2020
@jasonpaulos jasonpaulos added this to the Sprint 11 milestone Oct 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working FDE
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants