diff options
author | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2019-08-26 16:44:51 +0000 |
---|---|---|
committer | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2019-08-26 16:44:51 +0000 |
commit | 1dc46bee979266c96637ee558d257c0b2a645d48 (patch) | |
tree | b09063f8e43c9cd97a3ab13a25dcf66b25ac00b2 /docutils/tools/dev/generate_punctuation_chars.py | |
parent | 1bdf21cfb72854adca4b018952a3b333cb4058de (diff) | |
download | docutils-1dc46bee979266c96637ee558d257c0b2a645d48.tar.gz |
py3: Use 'sorted(foo)' instead of 'foo.sort()'
This works with iterators also (like 'dict.keys()' in Python 3)
Signed-off-by: Stephen Finucane <stephen@that.guru>
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8357 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/tools/dev/generate_punctuation_chars.py')
-rw-r--r-- | docutils/tools/dev/generate_punctuation_chars.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/docutils/tools/dev/generate_punctuation_chars.py b/docutils/tools/dev/generate_punctuation_chars.py index 55349016d..743054e80 100644 --- a/docutils/tools/dev/generate_punctuation_chars.py +++ b/docutils/tools/dev/generate_punctuation_chars.py @@ -269,8 +269,7 @@ def mark_intervals(s): Sort string and replace 'cdef' by 'c-f' and similar. """ l =[] - s = [ord(ch) for ch in s] - s.sort() + s = sorted([ord(ch) for ch in s]) for n in s: try: if l[-1][-1]+1 == n: |