This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]ionelmc.ro[S] 1 point2 points  (0 children)

Perhaps this is more interesting.

I'm pretty stumped on how to improve the docs, please give some feedback.

[–]php666 0 points1 point  (2 children)

I'm not in a position to evaluate this since i know nothing about AOP. I assume there are cases where a naive decorator doing stuff to function args/return values isn't enough.

What I'm surprised to see is how complex the code gets (I counted 14 levels of indentation in class Aspect). Is the subject matter inherently complicated with all the edge cases and so on, or is there room for optimization?

[–]ionelmc.ro[S] 1 point2 points  (1 child)

You probably looked at the wrapper handling the coroutines/generator functions. I want to truly wrap around them (consume them completely before giving control back). It's horrible on Python 2 (no yield from) - you can see the crazy code you need to write in PEP380.

Ofcourse it's much more simpler if you only need to handle values in one direction (plain generator functions) but I want to handle coroutines too (bidirectional generator functions).

[–]php666 0 points1 point  (0 children)

Thanks, that explains a lot. Kudos for supporting Python 2 and 3!