News for hackers. Stuff that matters.
Re:The unknown features of Python's `operator` module by nemetroid on Sunday August 08, 2021 @03:03PM (#28109222)
> It's unfortunate that people nitpick them, because the alternative is long and complicated examples that can't be understood at a glance.

If the examples don’t show cases where the feature even arguably is the best option, they’re bad examples of the feature. I don’t think that’s nitpicking.

Re:The unknown features of Python's `operator` module by klyrs on Sunday August 08, 2021 @06:46PM (#28110903)
The operator module is not something most python developers will ever need. It's a collection of very low-level tools that will rarely, if ever, be the right choice in a small code snippet. Can we even talk about the existence of these functions in an easy-to-read blog post, if the only 'right way' to use them is a full-blown DSL parser or whatever? Or, can we trust the reader to not run home and refactor their arithmetic to

  #this used to be y = 2 * x + 1 until I read a sweet blog
  y = operator.add(1, operator.mul(2, x))
I really don't see any danger of that, myself.