summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeth M Morton <seth.m.morton@gmail.com>2018-02-10 22:53:25 -0800
committerSeth M Morton <seth.m.morton@gmail.com>2018-02-10 22:53:25 -0800
commit4d18c76ed800f8174e628d90c9c660985295ad92 (patch)
tree90e651a947a33d20e6ffb5f81cc0167980a20522
parent48265401aaac36a685d82ea2af0eff7ae71b34a8 (diff)
downloadnatsort-48-feature-request-natsorted-sort-by-letters-then-numbers.tar.gz
-rw-r--r--natsort/compat/locale.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/natsort/compat/locale.py b/natsort/compat/locale.py
index cc386a2..ab392ee 100644
--- a/natsort/compat/locale.py
+++ b/natsort/compat/locale.py
@@ -66,10 +66,7 @@ except ImportError:
def custom_strcoll(a, b, last=sentinel):
"""strcoll that can handle a sentinel that is always last."""
if a is last:
- if b is last:
- return 0
- else:
- return 1
+ return 0 if a is b else 1
elif b is last: # a cannot also be sentinel b/c above logic
return -1
else: # neither are sentinel