Skip to content

Comment on Python does support if-else in lambdas...parent

Comments

The formatting got messed up but yes I agree. They were just examples, not the best ones perhaps.

I have felt a need for it sometimes though. Very complicated lambdas are perhaps generally better off as normal functions.

But I hate creating one-time-use functions if it isn't necessary.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.