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

open defined as a boolean interferes with Python built-in "open" #1

Open
ydurand opened this issue Oct 29, 2015 · 1 comment
Open

Comments

@ydurand
Copy link

ydurand commented Oct 29, 2015

nice and useful work ! just this little annoying detail which prevents me from writing files: the "open" builtin is masked by the "open" boolean from the package when using Python 2.7.8

foo = open("foo.txt")
Traceback (most recent call last):
File "", line 1, in
TypeError: 'bool' object is not callable
I am totally new to python, thus i just fixed this by renaming globally "open"
regards,
Yves

@jrmuizel
Copy link
Owner

Locally renaming open is probably the best fix for now. I'd like to keep the source close to the upstream mathematica for now to make it easy to compare the implementation. Eventually, I plan on doing a new version that is more python like.

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

No branches or pull requests

2 participants