3 ms·
Being as specific as possible with your types is how you make things more readable in Python. OrderedDict where the order matters, set where there are no duplic
by willcipriano 2y ago
Being as specific as possible with your types is how you make things more readable in Python. OrderedDict where the order matters, set where there are no duplicate items possible, The newish enums are great for things that have a limited set of values (dev, test, qa, prod) vs using a string. You can say a lot with type choice.
Another reason is I think that 3.7 behavior is just a C Python implementation detail, other interpreters may not honor it.
- sestep 2y agoYou're thinking of 3.6: https://stackoverflow.com/a/39980744/5044950 https://stackoverflow.com/a/39980744/5044950
- 7bit 2y ago> Being as specific as possible with your types is how you make things more readable in Python. If Dict already guarantees to keep Order, nothing ist won by using both Dict and OrderedDict. Just use Dict.
- pests 2y agoThe mere fact we're having this discussion means people don't know the guarantees and be being more explicit there is less room for confusion.