#186 New syntax for wrap()

open
nobody
None
6
2013-05-25
2013-05-25
No

Hi,

I added a new syntax to wrap(), that allows plugin developpers to use it as a @decorator with arguments.
Compatibility with the "old" syntax is not broken.

For example, in @join, the following syntax is currently used:
def join(self, irc, msg, args, channel, key):
# blah
join = wrap(join, ['validChannel', additional('something')])

And this patch allows this syntax:
@wrap(['validChannel', additional('something')])
def join(self, irc, msg, args, channel, key):
# blah

https://github.com/ProgVal/Limnoria/commit/66025cf7e412790bc8943f169324f923129e92c2

Regards,
Valentin

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks