LanceMaverick / skybeard-2

The omniscient telegram bot is back. Now in python 3 and based on a plug-in system
Other
6 stars 4 forks source link

Proposed explicit function call for all decorators in Skybeard #128

Closed natfarleydev closed 7 years ago

natfarleydev commented 7 years ago

Recently I came across a problem: when @onerror and @getargs are used in conjunction, both use the keyword argument text which clashes. E.g.

@onerror
@getargs
async def f(self, msg):
    # etc.

means that getargs ends up with two text keyword arguments. If instead we went with the pattern:

@onerror()
@getargs()
async def f(self, msg):
    # etc.

these kinds of problems would largely disappear.

natfarleydev commented 7 years ago

This is now the case.