-
-
Notifications
You must be signed in to change notification settings - Fork 205
Closed
Description
While open("foo", "r") may be considered redundant, some may arguably consider it explicit instead, since It is not always immediately obvious that open("foo") defaults to read only without first consulting the python documentation.
I do, however, agree that the following is an appropriate change for pyupgrade, since the U flag is explicitly deprecated.
-open("foo", "rUb")
+open("foo", "rb")
The "r" flag on the other hand is not deprecated, rather when used it is often for readability purposes, and so removing it is a stylistic choice, not necessarily an upgrade.
Metadata
Metadata
Assignees
Labels
No labels