-
Notifications
You must be signed in to change notification settings - Fork 22
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Explanation
Explain briefly why you think this makes the code simpler.
- This is a common but fun one I have noticed. I have noticed this pattern occur a lot and I believe in most cases it can be simplified to a single function call. I guess this would be kinda of similar to the isinstance checks where people don't realize the function can consume multiple args.
Example
a = "/a"
b = "b"
c = "c"
# Bad
os.path.join(a,os.path.join(b,c))
# Good
os.path.join(a,b,c)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request