We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://github.com/veox/python3-krakenex/blob/master/krakenex/api.py#L151 When defining functions like this def query_private(self, method, req={}, conn = None): you share a single instance of the req dictionary for every call that uses the default of req.
def query_private(self, method, req={}, conn = None):
req
def fn(x={}): return x call1 = fn() print(call1) call1["a"] = "A" call2 = fn() print(call2) print (call1 == call2)
If you want a fresh instance of an dictionary on every call of the function I suggest something like this.
def fn(x=None): if x is None: x = {}
Nevertheless I don't see a concrete problem raised by this in your code.
The text was updated successfully, but these errors were encountered:
Looks like sugar. Good point, though.
Some of this code is slated to become obsolete - see #11. No warning for that has been issued yet, since there hasn't been a release.
Will try to include that when time permits. Feel free to PR, too.
EDIT: Oh, and thanks for taking a look. :)
Sorry, something went wrong.
0a5aa13
No branches or pull requests
https://github.com/veox/python3-krakenex/blob/master/krakenex/api.py#L151
When defining functions like this
def query_private(self, method, req={}, conn = None):
you share a single instance of thereq
dictionary for every call that uses the default ofreq
.If you want a fresh instance of an dictionary on every call of the function I suggest something like this.
Nevertheless I don't see a concrete problem raised by this in your code.
The text was updated successfully, but these errors were encountered: