3 ms·
You're correct, and I think "patterns" would be a more straightforward term. I believe the confusion probably stems from the word "idiomatic," which means "usi
by SamBam 7y ago
You're correct, and I think "patterns" would be a more straightforward term.
I believe the confusion probably stems from the word "idiomatic," which means "using, containing, or denoting expressions that are natural to a native speaker."
i.e. "idiomatic English" simply means that it sounds like a native speaker. Likewise, "idiomatic python" would be code that reads like a fluent python programmer.
- afiori 7y agoand to sum it up the "if __name__ == "__main__":" is a standard idiomatic pattern in python
- Dylan16807 7y ago"Idiom" and "idiomatic" are connected. You've just demonstrated that the use is correct.
- SamBam 7y agoOf course they are "connected." I was explaining the confusion. However, "connected" is not the same as meaning the same thing. 1. idiom: a group of words established by usage as having a meaning not deducible from those of the individual words (e.g., rain cats and dogs, see the light ). 2. idiomatic: using, containing, or denoting expressions that are natural to a native speaker. Also "connected" is "idiosyncratic," and that means yet a third thing. "Idiosyncratic programming" would be the opposite of what you want! (Definitions from Oxford University Press / https://www.lexico.com/en https://www.lexico.com/en)
- Dylan16807 7y agoGo down a line or two on the definitions for 'idiom'. > A form of expression natural to a language, person, or group of people. > The dialect of a people or part of a country. I'm sure there could be grammatical nitpicks, but the word choice is appropriate.