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

Messages should be returned instead of modifying the list in place #50

Closed
yash-nisar opened this issue Mar 15, 2018 · 0 comments
Closed

Comments

@yash-nisar
Copy link
Contributor

No description provided.

yash-nisar added a commit to yash-nisar/tools-python that referenced this issue Mar 15, 2018
We now return messages from each `validation` function
instead of modifying lists in place.

Signed-off-by: Yash Nisar <yash.nisar@somaiya.edu>
yash-nisar added a commit to yash-nisar/tools-python that referenced this issue Mar 15, 2018
We now return messages from each `validation` function
instead of modifying lists in place.

Signed-off-by: Yash Nisar <yash.nisar@somaiya.edu>
yash-nisar added a commit to yash-nisar/tools-python that referenced this issue Mar 15, 2018
We now return messages from each `validation` function
instead of modifying lists in place.

Signed-off-by: Yash Nisar <yash.nisar@somaiya.edu>
yash-nisar added a commit to yash-nisar/tools-python that referenced this issue Mar 19, 2018
We now return messages from each `validation` function
instead of modifying lists in place. It is preferrable to
have side-effect free functions, so in this case, return a
new list with the element modified. There are a few rare
corner use cases where in place changes can make sense,
but 99% of the times, it a bad idea and can trigger any
kind of weird, byzantine and hard to debug bugs.

Signed-off-by: Yash Nisar <yash.nisar@somaiya.edu>
yash-nisar added a commit to yash-nisar/tools-python that referenced this issue Aug 12, 2018
We now return messages from each `validation` function
instead of modifying lists in place. It is preferrable to
have side-effect free functions, so in this case, return a
new list with the element modified. There are a few rare
corner use cases where in place changes can make sense,
but 99% of the times, it a bad idea and can trigger any
kind of weird, byzantine and hard to debug bugs.

Signed-off-by: Yash Nisar <yash.nisar@somaiya.edu>
pombredanne added a commit that referenced this issue Aug 12, 2018
Return messages instead of modifying list #50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant