BUG: Replaced default parameter [] by None and made some simplifications#9
Open
che85 wants to merge 3 commits intoChannelIQ:masterfrom
Open
BUG: Replaced default parameter [] by None and made some simplifications#9che85 wants to merge 3 commits intoChannelIQ:masterfrom
che85 wants to merge 3 commits intoChannelIQ:masterfrom
Conversation
…tains or json_are_same several times, setting lists to None instead of [] for reference see http://docs.python-guide.org/en/latest/writing/gotchas/#mutable-default-arguments
che85
commented
Oct 20, 2016
|
|
||
|
|
||
| def _are_same(expected, actual, ignore_value_of_keys, ignore_missing_keys=False): | ||
| # Check for None |
Author
There was a problem hiding this comment.
Here you might want to add something like "allowAdditionalKeys"
che85
added a commit
to che85/dcmqi
that referenced
this pull request
Oct 20, 2016
- added missing attributes - fixed json comparison script (for the reference ChannelIQ/jsoncompare#8 and ChannelIQ/jsoncompare#9)
Contributor
|
Hi Christian, I am the original author but now work at a new company (my own, https://flair.co !) and was wondering if it makes sense to fork this under a non-corporate account? Happy to fork it over to mine or something or leave it as is but I think ChannelIQ was acquired and I have no idea who is in charge of the account anymore. Anyhow, not sure of best practice but open to ideas and suggestions! I had fun writing this code and use it on some of our stuff so happy to continue contributing. |
|
@dandroid88 I think keeping it under your account is a good idea, and also adding a note in the README about the new location. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unexpected behavior might have occurred while running json_are_same several times in a row with different lists.
When using [] as the default value of a list and you run it several times, then the list might look different as you expected it to look like. (see here http://docs.python-guide.org/en/latest/writing/gotchas/#mutable-default-arguments)