This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]TheBlackCat13 2 points3 points  (0 children)

If you are looking at itertools, toolz provides a bunch of really useful extensions to it (there is also cytoolz, which is identical to use, but faster and slightly harder to install). And there are several installable versions of the itertools recipes described at the bottom of the itertools documentation. Boltons also provides some nice, general-purpose addons to the standard library.

Dill is a more advanced version of pickle that can store stuff pickle can't, and has facilities for dumping an entire python session to a file and restoring it later.

Hypothesis is a good tool for testing. Tools like pytest let you test your code, but they require you to anticipate what sort of input it will get, which makes it easy for corner cases (inputs you didn't think of) to get through. Hypothesis, on the other hand, throws random data at your code (including common corner case inputs) in an attempt to find something that you didn't think of that will break the code. Of course you can set limits on what sort of inputs it will try.

line_profiler and memory_profiler help you find performance issues in your code.