diff options
author | Seth M Morton <seth.m.morton@gmail.com> | 2016-06-04 21:53:42 -0700 |
---|---|---|
committer | Seth M Morton <seth.m.morton@gmail.com> | 2016-06-04 21:53:42 -0700 |
commit | feba9015b0bd6233f59e46508290d42a2554472b (patch) | |
tree | 6575ada7e929f3756b1309eb50d1156dc5c36111 /natsort/ns_enum.py | |
parent | 314cc1240f793e3c1001351e25278a88da174887 (diff) | |
download | natsort-feba9015b0bd6233f59e46508290d42a2554472b.tar.gz |
Documented new top-level enum access.
Diffstat (limited to 'natsort/ns_enum.py')
-rw-r--r-- | natsort/ns_enum.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/natsort/ns_enum.py b/natsort/ns_enum.py index 4d709c1..c471fd5 100644 --- a/natsort/ns_enum.py +++ b/natsort/ns_enum.py @@ -111,6 +111,18 @@ class ns(object): DIGIT, D Same as `VERSION` above. + Notes + ----- + If you prefer to use `import natsort as ns` as opposed to + `from natsort import natsorted, ns`, the `ns` options are + available as top-level imports. + + >>> 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 + """ # Following were previously now options but are now defaults. TYPESAFE = T = 0 |