You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered: