[Python-ideas] Reducing language complexity

Andrew Barnert abarnert at yahoo.com
Wed Dec 25 10:35:17 CET 2013


When I search for "python generators" instead of "python yield", I get the same docs pages, blog posts, and StackOverflow questions making up 90% of the results, in the same order.

When I search for "generators" instead of "yield" at docs.python.org, I get _worse_ results--a bunch of stuff about the C API and then a slew of random modules--the yield statement, the relevant tutorial sections, etc. are nowhere to be seen.

When I use the built-in help, "yield" gives me a nice overview; "generators" tells me there's no documentation.

So, in what way is "generators" a better term for finding help/tutorial/documentation than "yield"?

And I'm not sure what term for the metaclass feature would be better than "metaclass". (If you were going to suggest "using metaclass as __metaclass__" I might agree that was a small improvement, if Python hadn't fixed that 5 years ago.)

Sent from a random iPhone

On Dec 24, 2013, at 23:47, anatoly techtonik <techtonik at gmail.com> wrote:

> One of the tools to reduce language complexity is "explicitness" or
> the direct link to help/tutorial/documentation from the concept. The
> problem with most concepts in computer languages that they don't have
> distinct markers by which you can recognize one feature or another.
> For example, you can't recognize that code is generator based or uses
> metaclass magic without searching for yield or some references to
> metaclass through the source file.
> 
> One of the ways to reduce language complexity for new people who read
> you code, is to prepare them for advanced concepts that your code uses
> beforehand. For example, with the following section:
> 
> using generators as yield
> 
>         ^^^ name of this language feature and also help reference
>                              ^^^ distinct keywords and feature
> markers that you enable
> --
> anatoly t.
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/


More information about the Python-ideas mailing list