News for hackers. Stuff that matters.
Re:Python Anti-Pattern by patrick451 on Wednesday September 15, 2021 @09:36PM (#28546892)
I've never thought of this as a footgun. It's useful to accumulate state in a function, sort of like a static variable in c. E.g.,

  def func(x=[]):
      x.append(5)
      return x
I've always been annoyed that pylint yells at you for this.
Re:Python Anti-Pattern by ViViDboarder on Thursday September 16, 2021 @12:22AM (#28547984)
The issue is that it’s a non-apparent side effect to an outside caller.