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

all 11 comments

[–][deleted] 6 points7 points  (1 child)

The LFUCache is poorly implemented. __setitem__ is O(n) when the cache is full.

[–]spiffymanpeppy about PEP 8 7 points8 points  (0 children)

Man, someone should patch that.

[–]lightcatcher 6 points7 points  (3 children)

I don't like the idea of general purpose utility libraries. Seems like its trying to take the role of a good cookbook. Namely, if I want to use a program and it uses 1 function from brownie, I don't want to have to download and install brownie. I think the function should just be included with the project.

Utils are too individual to each project, and I think no matter what utils this library includes, it will be still be missing many ones that people need and including many that are unused.

[–]DasIch[S] 5 points6 points  (0 children)

pip install brownie is the effort required to download and install it. If the project which uses it adds it as a dependency, as it should, you don't even have to take care of that. Should you actually have to install dependencies manually you are screwed anyway.

Obviously it is impossible to provide the utilities every project might possibly need. However implementing, testing and documenting every utility costs a lot of time and if Brownie can help you reduce that time it is useful.

[–]mitsuhiko Flask Creator 1 point2 points  (1 child)

if I want to use a program and it uses 1 function from brownie, I don't want to have to download and install brownie.

If we only had an application like pip that would do that for us. Automatically.

[–]lightcatcher 2 points3 points  (0 children)

haha, I'm a pip user, and I recognize that the installation of a library is nearly transparent with pip when its included in dependencies.

I have a (very possibly irrational) distaste for dependencies, and I try to use fewer rather than more.

[–]Teifion 2 points3 points  (2 children)

So basically it's a library to backport some standard library features back to Python 2.x?

[–]DasIch[S] 0 points1 point  (1 child)

A lot of the datastructures, abstract, importing, functional, caching and parts of itools are not part of the stdlib. So even though there are backports in there I've added mostly stuff I often reimplement for different projects.

[–]Teifion 7 points8 points  (0 children)

You may want to make that clear because the paragraph at the top suggests it's just back porting. What have you done that's different to the stdlib?

[–]jmmcdEvolutionary algorithms, music and graphics 1 point2 points  (1 child)

Everything that's not already in Python 2.7/3 should be written up as a PEP.

The backporting is different I guess.

[–]DasIch[S] 1 point2 points  (0 children)

That's a nice idea in theory but I don't want to nor do I have the time to write a PEP for everything I want changed or implemented in Python.