X Tutup
Skip to content

Simplification of boolean checks#662

Merged
jh0ker merged 2 commits intopython-telegram-bot:masterfrom
saschalalala:payment_bool_simplification
Jun 18, 2017
Merged

Simplification of boolean checks#662
jh0ker merged 2 commits intopython-telegram-bot:masterfrom
saschalalala:payment_bool_simplification

Conversation

@saschalalala
Copy link
Copy Markdown
Contributor

While I worked on the other pull request, I saw that the boolean checks for the payment functions are somewhat unpythonic (See https://www.python.org/dev/peps/pep-0008/#programming-recommendations the last bullet point for reference).

@Eldinnie
Copy link
Copy Markdown
Member

Look good, let's wait if Travis aggrees

@jh0ker
Copy link
Copy Markdown
Member

jh0ker commented Jun 13, 2017

It was discussed in the developer group that while this change is good, we still should enforce ok to be a bool because else, we'll run into problems with the JSON encoding. So it would be nice if you added ok = bool(ok) to make sure of that.

@jh0ker jh0ker added the 📋 pending-reply work status: pending-reply label Jun 13, 2017
@saschalalala
Copy link
Copy Markdown
Contributor Author

Will do.

@saschalalala
Copy link
Copy Markdown
Contributor Author

This should do it, I guess. Or should I add a comment for clarification?

@jh0ker jh0ker merged commit 9b5e014 into python-telegram-bot:master Jun 18, 2017
@jh0ker
Copy link
Copy Markdown
Member

jh0ker commented Jun 18, 2017

Thanks, it looks good :)

@saschalalala saschalalala deleted the payment_bool_simplification branch June 18, 2017 10:23
@github-actions github-actions bot locked and limited conversation to collaborators Aug 23, 2020
@Bibo-Joshi Bibo-Joshi added 🔌 enhancement pr description: enhancement and removed enhancement labels Nov 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

🔌 enhancement pr description: enhancement 📋 pending-reply work status: pending-reply

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

X Tutup