summaryrefslogtreecommitdiff
path: root/natsort/ns_enum.py
diff options
context:
space:
mode:
authorSeth M Morton <seth.m.morton@gmail.com>2017-01-02 12:40:30 -0800
committerSeth M Morton <seth.m.morton@gmail.com>2017-01-02 12:40:30 -0800
commit0370984f93d253805e2ba33b607139c9856fdc69 (patch)
tree9b00097e089156f3bb1ee2ed75433f94f1301f87 /natsort/ns_enum.py
parent9657c75d628ffef06ed666a67f01241c59a2d56c (diff)
downloadnatsort-0370984f93d253805e2ba33b607139c9856fdc69.tar.gz
Small documentation updates in docstrings.
The docstrings to several functions have been updated to be more "true" (there was some mention to legacy code) or more clear.
Diffstat (limited to 'natsort/ns_enum.py')
-rw-r--r--natsort/ns_enum.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/natsort/ns_enum.py b/natsort/ns_enum.py
index c471fd5..e5ffbf5 100644
--- a/natsort/ns_enum.py
+++ b/natsort/ns_enum.py
@@ -31,20 +31,17 @@ class ns(object):
Tell `natsort` to parse numbers as floats.
UNSIGNED, U (default)
Tell `natsort` to ignore any sign (i.e. "-" or "+") to the immediate
- left of a number. It is the same as setting the old `signed` option
- to `False`. This is the default.
+ left of a number. This is the default.
SIGNED, S
Tell `natsort` to take into account any sign (i.e. "-" or "+")
- to the immediate left of a number. It is the same as setting
- the old `signed` option to `True`.
+ to the immediate left of a number.
REAL, R
This is a shortcut for ``ns.FLOAT | ns.SIGNED``, which is useful
when attempting to sort real numbers.
NOEXP, N
Tell `natsort` to not search for exponents as part of the number.
For example, with `NOEXP` the number "5.6E5" would be interpreted
- as `5.6`, `"E"`, and `5`. It is the same as setting the old
- `exp` option to `False`.
+ as `5.6`, `"E"`, and `5` instead of `560000`.
PATH, P
Tell `natsort` to interpret strings as filesystem paths, so they
will be split according to the filesystem separator
@@ -119,7 +116,6 @@ class ns(object):
>>> import natsort as ns
>>> a = ['num5.10', 'num-3', 'num5.3', 'num2']
- >>> # Which is more natural to write?
>>> ns.natsorted(a, alg=ns.REAL) == ns.natsorted(a, alg=ns.ns.REAL)
True