This code generates AttributeError: module 'pyformlang' has no attribute 'regular_expression
But importing Regex from pyformlang.regular_expression fixes that issue.
Why a method call to a library requires explicit import?
Importing Regex from pyformlang.regular_expression at epsilon_nfa.py causes circular import.
So importing Regex at runtime from to_regex() may resolve this. Like
Source: Here
This code generates AttributeError: module 'pyformlang' has no attribute 'regular_expression
But importing Regex from pyformlang.regular_expression fixes that issue.
Why a method call to a library requires explicit import?
Importing Regex from pyformlang.regular_expression at epsilon_nfa.py causes circular import. So importing Regex at runtime from to_regex() may resolve this. Like
at epsilon_nfa.py