The Wayback Machine - https://web.archive.org/web/20201124013643/https://github.com/OneDrive/onedrive-sdk-python/pull/79
Skip to content
New issue

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

Fix the instantiation of new objects #79

Merged
merged 3 commits into from Nov 7, 2016
Merged

Fix the instantiation of new objects #79

merged 3 commits into from Nov 7, 2016

Conversation

@D4N14L
Copy link
Contributor

@D4N14L D4N14L commented Nov 7, 2016

Fixes bug #78

def __init__(self, prop_dict={}):
self._prop_dict = prop_dict
def __init__(self, prop_dict=None):
self._prop_dict = prop_dict if prop_dict else {}

This comment has been minimized.

@cdmayer

cdmayer Nov 7, 2016
Contributor

self._prop_dict = prop_dict if prop_dict else {}

I would go with prop_dict if prop_dict is not None else {} because it reads a bit better

@@ -30,7 +30,7 @@
class AsyncOperationStatus(OneDriveObjectBase):

def __init__(self, prop_dict=None):
self._prop_dict = prop_dict if prop_dict else {}
self._prop_dict = prop_dict if prop_dict not None else {}

This comment has been minimized.

@cdmayer

cdmayer Nov 7, 2016
Contributor

no is

@cdmayer
cdmayer approved these changes Nov 7, 2016
@D4N14L D4N14L merged commit 4be29cf into master Nov 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
You can’t perform that action at this time.