Closed dusktreader closed 7 years ago
Hello,
You need to uses red.find("string")
instead of giving it the class object, same for find_all
.
I'm surprise, where have you find this syntax? I don't remember having used it in any example or part of the documentation.
Thanks for replying. I don't know why I started using that syntax. Maybe because I was trying to use 'str' and it wasn't working.
For posterity, the working syntax is
docstring = red.find('string', value=re.compile(
'.*Revises.*', flags=re.MULTILINE | re.DOTALL,
))
I'm attempting to find the docstring for a module and search for text in it. However, doing find for a StringNode type fails
Results in an error like this
The source code being processed is: