Talk:Natural sorting: Difference between revisions

(→‎Numeric sub-fields: task description)
 
(5 intermediate revisions by 2 users not shown)
Line 48:
 
::Looking at this more, it seems examples are interpreting "rightmost" as "leftmost", or perhaps "most significant" as "least significant." Maybe the task description could be clarified? —[[User:Sonia|Sonia]] ([[User talk:Sonia|talk]]) 21:40, 29 July 2014 (UTC)
 
I agree with [[User:Sonia|Sonia]], the Python treatment of numeric fields does not agree with the algorithm above, which makes the above example come out wrong. Consider this example:
<pre>
# TEST Numeric fields as numerics
Text strings:
['foo3bar99baz2.txt',
'foo2bar99baz3.txt',
'foo1bar99baz4.txt',
'foo4bar99baz1.txt']
Normally sorted :
['foo1bar99baz4.txt',
'foo2bar99baz3.txt',
'foo3bar99baz2.txt',
'foo4bar99baz1.txt']
Naturally sorted:
['foo1bar99baz4.txt',
'foo2bar99baz3.txt',
'foo3bar99baz2.txt',
'foo4bar99baz1.txt']
</pre>
 
I would expect the natural sort to give the reverse order, based on evaluating the groups from the right. -- [[User:Peter|Peter]] 00:20, 17 Feb 2017 (UTC)
 
Task point four is self-contradictory. It says "with the rightmost fields being the most significant" and later on "x9y99 before x9y100, before x10y0", which is the leftmost fields being the most significant. [[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 19:18, 7 April 2017 (UTC)
 
==Criticisms please==
7,794

edits