News for hackers. Stuff that matters.
Re:Upcoming Python features brought to you by Python Enhance... by dragonwriter on Monday February 14, 2022 @12:14PM (#30334622)
> Why not just do `l = len(x) if l is None else l`?

Because dev tooling can “see” and present information from the argument list much more easily than analyzing downstream behavior.

> What about side effects?

Those happen whether or not the computation is visible in the signature (though its more obvious to the programmer of the consuming code if it is visible.)

There are no comments on this comment yet.