about summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2012-03-14 17:17:32 +0100
committerhut <hut@lavabit.com>2012-03-14 17:17:32 +0100
commit6458c26c954e13be51c2e2a9b3cbe1d92cde55e0 (patch)
treee19b6b98ee54a442fc872dacb9a4f2bf77d805d0 /ranger
parent8a81af124633a65c2bbe12a7755cb982738790cd (diff)
downloadranger-6458c26c954e13be51c2e2a9b3cbe1d92cde55e0.tar.gz
ext.human_readable: added comment
Diffstat (limited to 'ranger')
-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 a3aed1bb..9667421a 100644
--- a/ranger/ext/human_readable.py
+++ b/ranger/ext/human_readable.py
@@ -12,6 +12,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: