Skip to content

'str' is a builtin datatype so do not use it as a variable name #29

@cclauss

Description

@cclauss
Contributor

PyFlask_2k18/datatypes/examples/string.py contains lots of syntax errors.

Activity

akshitgrover

akshitgrover commented on Oct 3, 2018

@akshitgrover
Member

Thank you for your feedback @cclauss
Will surely look into this.

cclauss

cclauss commented on Oct 3, 2018

@cclauss
ContributorAuthor

It is easy to run these tests on a local machine:

  1. python2 -c "import ast ; ast.parse(open('string.py').read())"
  2. python3 -c "import ast ; ast.parse(open('string.py').read())"
cclauss

cclauss commented on Oct 3, 2018

@cclauss
ContributorAuthor

flake8 testing of https://github.com/ACM-VIT/PyFlask_2k18 on Python 3.7.0

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

./datatypes/examples/string.py:5:27: E999 SyntaxError: invalid syntax
print "str.capitalize() : ", str.capitalize()
                          ^
./datatypes/examples/list.py:54:7: F821 undefined name 'odd'
print(odd) #this gives an error
      ^
./functions/examples/function_scope.py:6:7: F821 undefined name 'variable'
print(variable)
      ^
1     E999 SyntaxError: invalid syntax
2     F821 undefined name 'odd'
3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @cclauss@akshitgrover

        Issue actions

          'str' is a builtin datatype so do not use it as a variable name · Issue #29 · ACM-VIT/PyFlask_2k18