On Thu, 12 Sep 2013 14:41:11 -0400 Jacob Peck <[email protected]> wrote:
> That's what I had in mind, though it could be moved out of the code with > a function decorator. The python docs actually have one built for you: > https://wiki.python.org/moin/PythonDecoratorLibrary#CA-3f6fec70c7d7bf3088b427eb9972af63d8b674ae_43 > > So just prepend the function def with `@accepts(LeoButton, str, str, > debug=2)` and call it a day. But as I said, ugly. Ha, didn't know about that - I guess it is ugly, and runtime still. I guess what we really need is a unit test for @rclick working, but I'm not sure how you'd do that. > > ? (http://www.python.org/dev/peps/pep-3107/) > Huh, that's neat. Nice find. The PEPs are filled with gems. That's already implemented in py3. Cheers -Terry -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/groups/opt_out.
