boto / boto3

AWS SDK for Python
https://aws.amazon.com/sdk-for-python/
Apache License 2.0
9.07k stars 1.87k forks source link

Enhance the code standard and readability #4176

Closed Sivaranjitha2002 closed 4 months ago

Sivaranjitha2002 commented 4 months ago

change uneccessary 'elif' condition as 'if' condition

nateprewitt commented 4 months ago

Hi @Sivaranjitha2002, an elif is the correct conditional expression in this case. An elif is optimized by the Python interpreter over the separated if statements. It also better represents the relationship between the conditionals and avoids bugs in future changes if an else is added to block. I don't think we'll be accepting this, but thanks for the contribution.