potiuk commented on PR #24425:
URL: https://github.com/apache/airflow/pull/24425#issuecomment-1154908701

   The main idea to keep them sorted is for `airlfow providers command` - in 
order to get stable behaviour and alphabetic sorrting when they are printed in 
a command line. I believe wherever possible where human looks at the output 
list, the list should be sorted, otherwise it makes it extremely difficult to  
find what you are looking for if the output is not alphabetically sorted. 
   
   And using OrderedDict in this is case is "intent signalling" - no more, no 
less. When you are using dict, it's not "obvious" that your intent was to keep 
the entries is in order of insert. Yeah it's implementation detail in 3.6 and 
part of specification as of python 3.7 but by using OrderedDict you explicitly 
tell the reader "yeah - I want to keep it sorted and this was the intention".


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to