On Tue, Apr 24, 2018 at 4:27 PM, Antoine Pitrou <solip...@pitrou.net> wrote: > On Tue, 24 Apr 2018 01:06:30 -0500 > Tim Peters <tim.pet...@gmail.com> wrote: >> >> > - does it make Python easier to learn and teach? >> >> By whom? Almost no addition has ever made a language easier to learn >> for raw beginners: every addition is something they eventually need >> to learn. We could make Python easier to learn for beginners by >> throwing out virtually everything added since version 0.9.6 ;-) > > Constructs like "with ..." or "try / except / finally" make the > language easier to learn compared to the dances they are meant to > replace. "await" is a more readable and less confusing improvement > over "yield from". Format strings dispense from the older, more > convoluted formulations. Iteration is much simpler than the longer > forms we would have to write if generalized iterators didn't exist.
And assignment expressions are far simpler than breaking things out over multiple lines (particularly when you consider the infinite while loop alternative). But that doesn't change the fact that, as features, they do make the language harder to understand. The difference is that they make *your program* easier to understand. If you really want the *language* to be as easy as possible to fit into your head, you want a Turing tarpit: https://esolangs.org/wiki/Ook! Only three lexical tokens, and only eight operations. But any program written in Ook is going to be almost completely unreadable. That's the tradeoff. ChrisA _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com