summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-01-14 05:36:03 +0100
committerhut <hut@lavabit.com>2010-01-14 05:36:03 +0100
commitc0280bc867aecc29d8f72fbbd637133ea88729ba (patch)
tree8aa7dedd1b8ad5b2087f234e541726379aa3f05b
parent01c8834f9ff1e6990b5720d7efd3f350110df735 (diff)
downloadranger-c0280bc867aecc29d8f72fbbd637133ea88729ba.tar.gz
keyapi: added comments
-rw-r--r--ranger/keyapi.py8
1 files changed, 7 insertions, 1 deletions
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):