4 ms·
It is very close to python's @ syntax on top of methods definitions. Like: @get('/posts') mymethod ...
by louiskottmann 6y ago
It is very close to python's @ syntax on top of methods definitions.
Like:
@get('/posts')
mymethod
...
- _ZeD_ 6y ago? no, it's not. look at https://python-aspectlib.readthedocs.io/en/latest/ https://python-aspectlib.readthedocs.io/en/latest/ for an example of using aspect with python
- louiskottmann 6y agoDecorators and AOP are very similar concepts in my opinion then, if you prefer.
- lmm 6y agoPython decorators are a (limited) form of AOP: they let you transform functions in-place to implement cross-cutting concerns. Aspectlib allows you to do a more intrusive form of AOP.