Merge_list handle exception, so we can add two actual lists#399
Merge_list handle exception, so we can add two actual lists#399yashsinghcodes wants to merge 0 commit intoShuffle:masterfrom
Conversation
shuffle-tools/1.2.0/src/app.py
Outdated
| } | ||
| try: | ||
| # if nothing works lets try to add both list | ||
| list_one = list_one + list_two |
There was a problem hiding this comment.
"Merge" and "add list to list" are two entirely different things.
The description of the function is "Merges two lists of same type AND length."
There was a problem hiding this comment.
But doesn't it mean we are creating constraints that can be handled easily? But I get it this was the design choice, I will update the health workflow to use add list to list when it comes to this.
There was a problem hiding this comment.
But doesn't it mean we are creating constraints that can be handled easily? But I get it this was the design choice, I will update the health workflow to use
add list to listwhen it comes to this.
Constraints are good and helps you understand what a function does. In this case, e.g. plus together each key instead of plusing the entire thing with ambiguous results
7c1db1b to
9666d70
Compare
Handled it at the exception, as the did not wanted to interfere with set_key logic above it. Let me know if this looks good. I did test it and seems to me. That it should work and now can handle all the cases.
The only problem I do have is it really required to have the length of the two list to be same now? That we have a exception which handles it? Let me know.