We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Counting on the order of items in a dictionary would be an unwise thing, which some languages deliberately randomise just to discourage the habit. Counting on the order of evaluation of items in a sequence is extremely reasonable for Python, a strictly-evaluated, imperative language.
Comprehensions and generators have long been central to idiomatic Python. The usage you're complaining about is widespread. Making the evaluation of sequences non-deterministic a) isn't something GvR is ever likely to consider given his history and expressed opinions and b) would be a code-breaking change for so much production code that the complaints would make the Python 3 hoo-ha seem a mild disagreement.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Nested Lists
You are viewing a single comment's thread. Return to all comments →
Counting on the order of items in a dictionary would be an unwise thing, which some languages deliberately randomise just to discourage the habit. Counting on the order of evaluation of items in a sequence is extremely reasonable for Python, a strictly-evaluated, imperative language.
Comprehensions and generators have long been central to idiomatic Python. The usage you're complaining about is widespread. Making the evaluation of sequences non-deterministic a) isn't something GvR is ever likely to consider given his history and expressed opinions and b) would be a code-breaking change for so much production code that the complaints would make the Python 3 hoo-ha seem a mild disagreement.