re module has no attribute compile
Question: I am trying to use the following command in Python 3:

    
    
    text = re.compile('attribute')
    

but it tells me that that 're module has no attribute compile'. Has the
command been updated in Python 3?


Answer: You can debug such scenario by using `imp.find_module()`:

    
    
    import imp
    imp.find_module("re")
    

It will tell you which `re.py` is imported.

