News for hackers. Stuff that matters.
Re:Reasons Python Sucks by nicolashahn on Tuesday December 18, 2018 @12:35PM (#18708536)
I think it makes more sense in a language where you have to write callbacks all the time. I consider it a feature in Python, because by using `def` you're forced to imbue the function with meaning by providing it a name. Otherwise, it's just reading through a potentially complicated function without any context of what it's supposed to be doing.
Re:Reasons Python Sucks by Too on Tuesday December 18, 2018 @01:45PM (#18709294)
All languages, including python, where you do a lot of asynchronous io require callbacks all the time. It's only recently python got await-support to deal with this. Single line lambdas is a real PITA when your not using asyncio and python maintainers have said they don't plan to change it :(
Re:Reasons Python Sucks by saagarjha on Tuesday December 18, 2018 @08:19PM (#18712222)
It also makes sense if you're trying to do any sort of functional programming.
Re:Reasons Python Sucks by xapata on Tuesday December 18, 2018 @11:29PM (#18713019)
I use Python for functional programming and I don't miss multiline lambdas. I have a large monitor, so vertical space isn't at a premium for me.