This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author abarry
Recipients Guido.van.Rossum, abarry, benjamin.peterson, berker.peksag, dirn, eric.araujo, eric.smith, eric.snow, gvanrossum, infinity0, james, ncoghlan, peyton
Date 2016-08-01.01:16:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Sure, here goes; this is an IRC game bot which I contribute to. Apologies for the long links, it's the only way to make sure this consistently points to the same place regardless of future commits.

The 'cmd' decorator we use is defined at - we use its __call__ method to add the function to it; see next link.

How it's used: - ideally, a syntax such as the following would be nice for these definitions:

­@cmd("myrole", <keyword arguments here>).set
def myrole(cli, nick, chan, rest):
    # ... do stuff here ...

Historically (we used an arcane closure-based version that no one understood), we could call that function after directly, like any normal function. Now, though, we have to call it like this:

I'd like to state again that, while we'd use this new syntax, we've already worked around this lack of syntax. Whatever comes out of this, we won't be negatively affected, but decorators are meant to bring whatever alters the function right where it starts, so having syntax that eases that would make sense (to me, anyway).
Date User Action Args
2016-08-01 01:16:12abarrysetrecipients: + abarry, gvanrossum, ncoghlan, eric.smith, benjamin.peterson, eric.araujo, infinity0, eric.snow, berker.peksag, dirn, Guido.van.Rossum, james, peyton
2016-08-01 01:16:12abarrysetmessageid: <>
2016-08-01 01:16:11abarrylinkissue19660 messages
2016-08-01 01:16:10abarrycreate