diff options
author | hut <hut@lavabit.com> | 2012-03-14 17:17:32 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2012-05-03 18:00:58 +0200 |
commit | 78a98cfdfb498382e953b8955d3753b413b2efd9 (patch) | |
tree | df555f16dfddb67eacf60273d4f3df67bda88acc | |
parent | 9fcef7132f7503498398ba13f2cda86be443be2f (diff) | |
download | ranger-78a98cfdfb498382e953b8955d3753b413b2efd9.tar.gz |
ext.human_readable: added comment
-rw-r--r-- | ranger/ext/human_readable.py | 4 |
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: |