News for hackers. Stuff that matters.
Re:Boltons: A set of BSD-licensed, pure-Python utilities by j88439h84 on Tuesday October 09, 2018 @06:29PM (#18180375)
Toolz is one of my favorite python libraries. I use it all the time. It provides even more of this useful functionality. It also has a sped-up version called Cytoolz written with Cython.

https://toolz.readthedocs.io

https://github.com/pytoolz/cytoolz

Re:Boltons: A set of BSD-licensed, pure-Python utilities by ktpsns on Tuesday October 09, 2018 @06:43PM (#18180444)
Toolz is really a game changer since it allows you to write elegant functional code (lazy evaluations, currying, pipes, parallelism) in Python which feels native.

As python has the "batteries included" philosophy, such useful gems should be included into the standard library...

Re:Boltons: A set of BSD-licensed, pure-Python utilities by TylerE on Wednesday October 10, 2018 @12:31AM (#18181972)
I will kind of disagree.

While having stuff in stdlib can be convenient, it all tends to be where active development goes to die. Compare httplib with something like Requests.

Re:Boltons: A set of BSD-licensed, pure-Python utilities by maxerickson on Wednesday October 10, 2018 @07:38AM (#18183857)
The comparison would be with urllib.request:

https://docs.python.org/3/library/urllib.request.html

Which right there recommends Requests, but for simple tasks it's kind of unfortunate that people bring in a library dependency.

Re:Boltons: A set of BSD-licensed, pure-Python utilities by pmiller2 on Tuesday October 09, 2018 @06:49PM (#18180491)
Can anyone comment on the efficiency or lack thereof of toolz?
Re:Boltons: A set of BSD-licensed, pure-Python utilities by merlincorey on Tuesday October 09, 2018 @07:49PM (#18180795)
It uses `itertools` internally very heavily, which means if you generally are using generators and such, you maintain those benefits, as well as get to work with infinite sequences, etc.

If you do find a `toolz` function to be too slow, there's always the `cytoolz` versions.

Re:Boltons: A set of BSD-licensed, pure-Python utilities by stochastic_monk on Tuesday October 09, 2018 @11:24PM (#18181724)
cytoolz’s frequencies was around 10x as fast as using a vanilla dict and counting elements manually, which was in turn twice as fast as collections.Counter when I measured them a few years ago.

It’s solid work.

Re:Boltons: A set of BSD-licensed, pure-Python utilities by webmaven on Wednesday October 10, 2018 @12:04PM (#18186183)
How does cytoolz performance compare with toolz under PyPy?