-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
def send_metadata_request(self, payloads=[], fail_on_error=True, |
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.
tvoinarovskyi
Metadata
Metadata
Assignees
Labels
No labels