Tim Peters wrote:
def objective_readability_score(text):
    "Return the readability of `text`, a float in 0.0 .. 1.0"
    return 2.0 * text.count(":=") / len(text)

A useful-looking piece of code, but it could be more readable.
It only gives itself a readability score of 0.0136986301369863.

--
Greg
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to