3 ms·
IMHO pythonic means that you adhere with the principle "there should be one --and preferably only one -- obvious way to do it". And that one way is set out by t
by terminalcommand 9y ago
IMHO pythonic means that you adhere with the principle "there should be one --and preferably only one -- obvious way to do it". And that one way is set out by the BDFL Guido :).
I have theory that, python was introduced out of frustration with Perl.
As we all know, Perl had the principle of TIMTOWTDI.
Another far more tangential and biased theory here: As Python imposes strict programming principles, it resembles Java in forcing the programmer to abide by the styles set out by the language designers. And maybe that's why schools prefer to teach Python instead of Ruby as a scripting language.
PS: I have nothing against Java and I love Python. My theory is based upon Guido's insistence on not opening the language fully to functional programming. I'd like to see better lambdas, functional programming without itertools etc. But I know Guido has his reasons, pythonic code uses list comprehensions instead of FP.