Remove mutable defaults from function signature. (#1663)
This commit is contained in:
parent
32ad47c898
commit
020fe7b50b
4 changed files with 11 additions and 10 deletions
|
@ -55,12 +55,12 @@ class Iteratorize:
|
|||
Adapted from: https://stackoverflow.com/a/9969000
|
||||
"""
|
||||
|
||||
def __init__(self, func, kwargs={}, callback=None):
|
||||
def __init__(self, func, kwargs=None, callback=None):
|
||||
self.mfunc = func
|
||||
self.c_callback = callback
|
||||
self.q = Queue()
|
||||
self.sentinel = object()
|
||||
self.kwargs = kwargs
|
||||
self.kwargs = kwargs or {}
|
||||
self.stop_now = False
|
||||
|
||||
def _callback(val):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue