今天写了一段pyhton代码,提示
type object 're' has no attribute 'compile'
经检查和调试,发现是因为文件中有如下两句
import re from sympy import *
把它俩交换顺序之后,问题解决,
猜想:sympy中也有一个符号名字为re,导致覆盖了re模块,交换顺序之后,则re模块覆盖了sympy中的符号

今天写了一段pyhton代码,提示
type object 're' has no attribute 'compile'
经检查和调试,发现是因为文件中有如下两句
import re from sympy import *
把它俩交换顺序之后,问题解决,
猜想:sympy中也有一个符号名字为re,导致覆盖了re模块,交换顺序之后,则re模块覆盖了sympy中的符号