summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2012-03-14 17:17:32 +0100
committerhut <hut@lavabit.com>2012-05-03 18:00:58 +0200
commit78a98cfdfb498382e953b8955d3753b413b2efd9 (patch)
treedf555f16dfddb67eacf60273d4f3df67bda88acc
parent9fcef7132f7503498398ba13f2cda86be443be2f (diff)
downloadranger-78a98cfdfb498382e953b8955d3753b413b2efd9.tar.gz
ext.human_readable: added comment
-rw-r--r--ranger/ext/human_readable.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/ranger/ext/human_readable.py b/ranger/ext/human_readable.py
index c5bd2aac..1a667519 100644
--- a/ranger/ext/human_readable.py
+++ b/ranger/ext/human_readable.py
@@ -24,6 +24,10 @@ def human_readable(byte, separator=' '):
 	>>> human_readable(2 ** 20 * 1023)
 	'1023 M'
 	"""
+
+	# I know this can be written much shorter, but this long version
+	# performs much better than what I had before.  If you attempt to
+	# shorten this code, take performance into consideration.
 	if byte <= 0:
 		return '0'
 	if byte < 2**10: