From c0280bc867aecc29d8f72fbbd637133ea88729ba Mon Sep 17 00:00:00 2001 From: hut Date: Thu, 14 Jan 2010 05:36:03 +0100 Subject: keyapi: added comments --- ranger/keyapi.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ranger/keyapi.py b/ranger/keyapi.py index 546a0641..15be9a7c 100644 --- a/ranger/keyapi.py +++ b/ranger/keyapi.py @@ -27,7 +27,13 @@ def make_abbreviations(command_list): # do the binding command_list.bind(lastarg, *args[:-1]) else: - # act as a decorator + # act as a decorator. eg: + # @bind('a') + # def do_stuff(arg): + # arg.fm.ui.do_stuff() + # + # is equivalent to: + # bind('a', lambda arg: arg.fm.ui.do_stuff()) return lambda fnc: command_list.bind(fnc, *args) def hint(*args): -- cgit 1.4.1-2-gfad0