Skip to content

python3 compatibility#15

Open
andfranklin wants to merge 2 commits intodavidwhogg:masterfrom
andfranklin:master
Open

python3 compatibility#15
andfranklin wants to merge 2 commits intodavidwhogg:masterfrom
andfranklin:master

Conversation

@andfranklin
Copy link

cube.py and simple_cube.py now work in python3.

This change makes simple_cube.py work in python 3.
It is necessary since the class scope is inaccessible from
functions, list comprehensions or generator expressions
enclosed in that scope; they act as if that scope does not exist.

see: https://stackoverflow.com/questions/13905741/accessing-class-variables-from-a-list-comprehension-in-the-class-definition

This code was tested and worked in 3.8.4 & 2.7.14
The code now works in python2 and python3.
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