News for hackers. Stuff that matters.
Re:Stop writing lambda expressions in Python by JasonFruit on Thursday September 27, 2018 @04:08PM (#18088101)
Nobody really likes Python the language especially much, but lots of people love Python the ecosystem, because it lets them get stuff done. I can think of a dozen languages I like better than Python, but none that's more practical in as many different contexts.

--------------------

Edit: Apparently, there are some people who do like Python the language, and some people who dislike Python the ecosystem. If you want to find a thing, just say it doesn't exist, and it will find you.

Re:Stop writing lambda expressions in Python by alexchamberlain on Thursday September 27, 2018 @04:10PM (#18088112)
I disagree... I came for the syntax and readability; I've stayed for the community.
Re:Stop writing lambda expressions in Python by JasonFruit on Thursday September 27, 2018 @04:13PM (#18088136)
I suppose I like the readability too, but there are a number of things about the language I would rather had been done differently; I still insist that its approach to scope is worse than any choice except making everything global.
Re:Stop writing lambda expressions in Python by alexchamberlain on Thursday September 27, 2018 @04:21PM (#18088211)
I tend to recommend people refavtor their functions into smaller ones if scope is not clear, but I accept it's different from many of its predecessors.
Re:Stop writing lambda expressions in Python by AlexCoventry on Thursday September 27, 2018 @06:40PM (#18089487)
If the local/ global scooping rules are hurting you that much, you are probably putting more state in module-level variables than is healthy.
Re:Stop writing lambda expressions in Python by JasonFruit on Thursday September 27, 2018 @08:33PM (#18090073)
It's not that: it's the hobbled function scope that doesn't handle nested functions the way I would expect and hope.
Re:Stop writing lambda expressions in Python by nikofeyn on Thursday September 27, 2018 @04:15PM (#18088152)
in my experience, the python ecosystem is a mess. yes, there are lots of libraries, but that is just one part of the ecosystem. for one, everyone uses a different distribution, whether it's anaconda, python(x,y), or just the default python install. this creates a lot of fragmentation, and it's hard to come into a project and fix the mess that's been created. then there's the 2.x vs 3.x issue that is still a problem. i have been introduced to three python projects at various times in my work, and all still used python 2.7 and even python 2.6. (these were projects that i helped out on and didn't create or own.) in each case, python made it quite difficult to even understand if you had setup the environment correctly.

but yes, there are lots of libraries. i think people need to take a stance and simply pull those libraries into other languages (which many are already) or simply realize that most are just wrappers around some other language library, which can be easily done in other languages as well.

Re:Stop writing lambda expressions in Python by FridgeSeal on Thursday September 27, 2018 @08:26PM (#18090037)
You're right, it is a mess.

Don't get me wrong, there's a huge number of packages available and a lot of them are really quality and I have used the language a lot, but good gosh is the packaging a deployment a fucking disaster.

Environments are a 3rd party bolt on, that relies on hacking around with environment variables. There's no distinction between dev dependencies and actual, application dependencies. The packaging/deployment tool has gone through a bunch of different formats/styles and when it comes to deploying your code, you have nothing better than writing a bash script that automates your environment creation, activation and running of the packaging tool (you then just hope that Pip doesn't fail on some bizarre edge).

Re:Stop writing lambda expressions in Python by pseudalopex on Thursday September 27, 2018 @10:52PM (#18090624)
Python packaging has a lot of warts, but you can specify dev dependencies in extras_require. Also, you can just run a virtual environment's interpreter without "activating" the environment.
Re:Stop writing lambda expressions in Python by pdonis on Thursday September 27, 2018 @04:16PM (#18088158)
> Nobody really likes Python the language especially much

I beg to differ. I like Python the language. I also like Python the ecosystem.