Skip to content

Files

Latest commit

 

History

History
19 lines (12 loc) · 288 Bytes

nested-min-max.md

File metadata and controls

19 lines (12 loc) · 288 Bytes

Pattern: Use of nested min/max

Issue: -

Description

Nested calls min(1, min(2, 3)) can be rewritten as min(1, 2, 3).

Example of incorrect code:

print(min(1, min(2, 3)))  # [nested-min-max]

Example of correct code:

print(min(1, 2, 3))