News for hackers. Stuff that matters.
Re:Minimal examples of data structures and algorithms in Python by devsnd on Monday April 24, 2017 @06:22PM (#14188944)
I had a quick look at the examples and while they are written in python, they are not pythonic at all. `list_flatten` should use list a comprehension and probably use `collections.abc` [1] for the isinstance test. The `reverse_bits` function only works for 32 bit systems and should use `sys.intmax` [2] to find out how many bits to actually reverse. And `bit.subsets` will mutate the argument you gave to it to calculate the result (which is probably not intended). That's all the examples I looked at so far.

I know that the title says "minimal examples" and the goal is not make it "production ready", but as a learning resource you should always make sure to provide good examples, because that's what the students will use and write later on.

[1] https://docs.python.org/3/library/collections.abc.html#colle...

[2] http://stackoverflow.com/a/24944155/1191373

Re:Minimal examples of data structures and algorithms in Python by racerror on Monday April 24, 2017 @10:10PM (#14190205)
You could have cloned, made proposed changes to the source, pushed and made a pull request. Then, referenced it here, made the same point and provided the solution with the same amount of effort as your English-only criticism.
Re:Minimal examples of data structures and algorithms in Python by leblancfg on Tuesday April 25, 2017 @06:40AM (#14192282)
I don't think it's fair to ask of a stranger to take the time to fix someone else's cheat cheat if he's never going to use it. The criticism still holds, however.
Re:Minimal examples of data structures and algorithms in Python by racerror on Tuesday April 25, 2017 @01:02PM (#14195601)
I agree with you.

The point I was making, albeit poorly, was open-source is awesome. git, github and pull requests make it even better.

When someone contributes something that may be half-baked and someone else comes along to critique it. A pull-request that demonstrates the solution can be an equally efficient means of communicating the same criticism. Meanwhile, the whole community reaps the benefit of that effort.

TLDR; OSS devs should favor, "showing the way" and github makes that easy.