This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Marco Sulla
Recipients Marco Sulla
Date 2019-08-22.15:54:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1566489249.72.0.0117548525062.issue37918@roundup.psfhosted.org>
In-reply-to
Content
As title. I just created it:

https://pastebin.com/pNYezw2V

I think it could be useful to have a more descriptive way to declare a file open mode. Many languages has an enum for this.

Maybe open(), os.fdopen(), os.popen() and pathlib.Path.open() can just accept also an OpenMode enum as mode parameter, without the need to write OpenMode.append.value, for example, but just OpenMode.append. As an alternative, OpenMode could be a namedtuple.

I don't know in which module should be put. In `builtins`, `os` or `pathlib`?
History
Date User Action Args
2019-08-22 15:54:09Marco Sullasetrecipients: + Marco Sulla
2019-08-22 15:54:09Marco Sullasetmessageid: <1566489249.72.0.0117548525062.issue37918@roundup.psfhosted.org>
2019-08-22 15:54:09Marco Sullalinkissue37918 messages
2019-08-22 15:54:09Marco Sullacreate