Closed
Description
I noticed there are a bunch of places where a mutable type is used for the default value. For example, there are a bunch of payloads=[]
in kafka/client.py
:
Line 591 in 3701690
Using mutable types for default args is typically a no-no unless their surprising behavior is being explicitly abused, for an explanation see: http://effbot.org/zone/default-values.htm
I haven't spelunked in the code much, but I suspect:
- They are an oversight rather than intentional.
- A simple fix of switching these to tuples would solve the issue.
Metadata
Metadata
Assignees
Labels
No labels