Everybody loves decorators. However there's is a difference if a decorator is called with or without () (as in @logged vs @logged("foo")). In the first case, the logged will be called with the function it decorates. In the second case, logged is called with a string and should return a function that accepts the function to be decorated. Below is a simple solution to support both cases in one decorator.
If it won't be simple, it simply won't be. [Hire me, source code] by Miki Tebeka, CEO, 353Solutions
Subscribe to:
Post Comments (Atom)
1 comment:
Приветик!
Даже очень забавный сайт.
Море приколов...План, Миксы, Соль, МДМА, и т.д.
Жми на сайт:
[b]
http://xudra.iluvaxav.tk
[/b]
Post a Comment