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

Python 3 issues #55

Closed
cclauss opened this issue Oct 16, 2018 · 1 comment · Fixed by #56
Closed

Python 3 issues #55

cclauss opened this issue Oct 16, 2018 · 1 comment · Fixed by #56

Comments

@cclauss
Copy link

cclauss commented Oct 16, 2018

flake8 testing of https://github.com/norvig/pytudes on Python 3.7.0

$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics

./py/testaccum.py:21:21: E999 SyntaxError: invalid syntax
    print acc_display
                    ^
./py/py2html.py:79:12: F821 undefined name 'cmp'
    return cmp(num(x[0]), num(y[0]))
           ^
./py/lispy.py:119:26: E999 SyntaxError: invalid syntax
            print '%s: %s' % (type(e).__name__, e)
                         ^
./py/pal.py:130:22: E999 SyntaxError: invalid syntax
            print self.best
                     ^
./py/lispytest.py:106:19: E999 SyntaxError: invalid syntax
            print x, '=>', to_string(result)
                  ^
./py/ibol.py:78:47: E999 SyntaxError: invalid syntax
    print "Number of genomes: %d (%d distinct)" % (len(genomes), len(set(genomes)))
                                              ^
./py/docex.py:101:16: E999 TabError: inconsistent use of tabs and spaces in indentation
	if self.failed:
               ^
./py/lettercount.py:64:49: E999 SyntaxError: invalid syntax
        print '%s: %s %s words (%s tokens) at %s' % (
                                                ^
./py/parse.py:29:19: E999 TabError: inconsistent use of tabs and spaces in indentation
		rhs = mklist(rhs)
                  ^
./py/ngrams.py:30:28: E999 SyntaxError: invalid syntax
    print 'Running tests...'
                           ^
./py/pal2.py:188:37: E999 SyntaxError: invalid syntax
        print 'using reversibles ...'
                                    ^
./py/lis.py:98:26: F821 undefined name 'raw_input'
        val = eval(parse(raw_input(prompt)))
                         ^
./py/yaptu.py:76:49: E999 SyntaxError: invalid syntax
            if self.verbose: print '=== eval{%s}' % expr,
                                                ^
11    E999 TabError: inconsistent use of tabs and spaces in indentation
2     F821 undefined name 'raw_input'
13
@norvig
Copy link
Owner

norvig commented Oct 16, 2018

Yes, I should update everything to Python 3.

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 a pull request may close this issue.

2 participants