Skip to content

Changes ternary conditionals to be PEP308 compliant #5827

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

Merged
merged 1 commit into from
Feb 14, 2018
Merged

Changes ternary conditionals to be PEP308 compliant #5827

merged 1 commit into from
Feb 14, 2018

Conversation

kentwait
Copy link
Contributor

@kentwait kentwait commented Feb 14, 2018

Description

Updates the tutorial and the codebase to be be PEP308-compliant with regards to conditional ternary operations this if condition else that.

I came across this from following the tutorial and found that the example was using condition and this or that-style conditional which seemed not very Pythonic. The codebase only uses this style once and this pull request also changes that instance.

@tomchristie
Copy link
Member

Yup, looks good. Thanks!

@tomchristie tomchristie merged commit d82b332 into encode:master Feb 14, 2018
@tomchristie tomchristie added this to the 3.8 Release milestone Feb 14, 2018
pchiquet pushed a commit to pchiquet/django-rest-framework that referenced this pull request Nov 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants