Terry J. Reedy <tjre...@udel.edu> added the comment:

(f0, C0) is the correct insertion and line number order for the dict that would 
be returned by pyclbr for a fleshed-out file.  After 'sorted' is removed, the 
mock must imitate that.

One could argue that previously, and even now for 3.6, the initial insertion 
order should be 'wrong' to test that format_children sorts the return list.  
But what is the chance that there will ever be an alternate 3.6 (or even later) 
implementation that runs tkinter and therefore might run IDLE but has a dict 
that does not preserve insert order?

I probably should not worry about the dict insert order guarantee being 
rescinded in a future version.  Maybe instead I should just add a comment that 
transform_children depends on iteration order being insert order == line-number 
order.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32411>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to