[Python-ideas] Where-statement (Proposal for function expressions)

Jan Kaliszewski zuo at chopin.edu.pl
Thu Jul 16 19:38:23 CEST 2009


16-07-2009, 19:13 Steven D'Aprano <steve at pearwood.info> wrote:

> Not just redundant, but actively harmful: it encourages the coder to
> duplicate common code inside functions instead of factoring it out into
> a single external function.

But note that, if it's necessary, refactoring such code moving
appropriate parts e.g. into global scope could be done very easily.

> Now of course it's possible to inappropriately inline common code
> inside functions without "where".

Every language feature can be misused. More powerful feature -- larger
possibilities of misusing. But language is not for substituting
programmer's sense.

Cheers,

-- 
Jan Kaliszewski <zuo at chopin.edu.pl>



More information about the Python-ideas mailing list