Got bitten by this so many times
RT @OliverCaldwell@twitter.com
I'm no Python expert, but is this a super common bug? How do people use defaults without this happening?
def x (y=[]): return y
x() => []x().append(10)x() => [10]
🐦🔗: https://twitter.com/OliverCaldwell/status/1504472687426498562
literally watch me write:
def x(y=lambda: []): return y
Computer Fairies is a Mastodon instance that aims to be as queer, friendly and furry as possible. We welcome all kinds of computer fairies!