Message329183
| Author |
serhiy.storchaka |
| Recipients |
Windson Yang, pablogsal, serhiy.storchaka, xtreak, yselivanov |
| Date |
2018年11月03日.06:50:18 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1541227818.85.0.788709270274.issue35113@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Use a stack of names. Every time when you enter a class and function nodes, push the current name on the stack, and pop it out after handling child nodes. Compare the qualified name with '.'.join(self.stack). Don't use the recursive decorator, it is not suitable for this, because you need to execute some code before and after handling child nodes. Just add a loop for child nodes in your handler.
Yet one thing that you should take to account: decorators. In you should return the line number of the first decorator if they are used. This is easy.
This is an interesting issue. I would take it if you do not already working on it. But I think it should be interesting and useful to you. Good practice. Once you get some working code, create a PR. I will suggest next steps. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2018年11月03日 06:50:18 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, yselivanov, pablogsal, Windson Yang, xtreak |
| 2018年11月03日 06:50:18 | serhiy.storchaka | set | messageid: <1541227818.85.0.788709270274.issue35113@psf.upfronthosting.co.za> |
| 2018年11月03日 06:50:18 | serhiy.storchaka | link | issue35113 messages |
| 2018年11月03日 06:50:18 | serhiy.storchaka | create |
|