title: ImportError: cannot import name 'Parser'
body: <p>I have a bunch of modules. The modules and their imports are listed below:</p>
  
  <pre><code>ast.py:
      import enum
      from abc import ABC, abstractmethod
  err.py:
      none
  lexer.py:
      from token import TokenTag, Token
  parser.py:
      from ast import *
      from err import UndeclaredIdentError, SyntaxError
      from token import TokenTag as Tag
      from type import Type
  peep.py:
      from lexer import Lexer
      from parser import Parser
  token.py:
      import enum
  treewalker.py:
      from abc import ABC, abstractmethod
  type.py:
      import enum
      from treewalker import TreeWalker
  </code></pre>
  
  <p>I tried to run peep.py but I get the following error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "peep.py", line 2, in &lt;module&gt;
      from parser import Parser
  ImportError: cannot import name 'Parser'
  </code></pre>
  
  <p>I don't understand why I got ImportError, I can't find any obvious circular dependencies in the file hierachy above. I did some research, I figured that I should rename the module ast.py to syntaxtree.py because ast.py already exists in Python's standard library. After renaming, it produced the same result. Any form of help is appreciated, thanks!</p>