[issue46766] Add a class for file operations so a syntax such as open("file.img", File.Write | File.Binary | File.Disk) is possible.

2022-02-15 Thread Isaac Johnson


New submission from Isaac Johnson :

I think it would be great for something like this to be with the IO module. It 
will improve code readability.

--
components: Library (Lib)
messages: 413315
nosy: isaacsjohnson22
priority: normal
severity: normal
status: open
title: Add a class for file operations so a syntax such as open("file.img", 
File.Write | File.Binary | File.Disk) is possible.
versions: Python 3.11

___
Python tracker 
<https://bugs.python.org/issue46766>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46766] Add a class for file operations so a syntax such as open("file.img", File.Write | File.Binary | File.Disk) is possible.

2022-02-15 Thread Isaac Johnson


Isaac Johnson  added the comment:

I'm currently working on implementing this. It will probably be a few weeks.

--

___
Python tracker 
<https://bugs.python.org/issue46766>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46766] Add a class for file operations so a syntax such as open("file.img", File.Write | File.Binary | File.Disk) is possible.

2022-02-15 Thread Isaac Johnson


Change by Isaac Johnson :


--
type:  -> enhancement

___
Python tracker 
<https://bugs.python.org/issue46766>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46766] Add a class for file operations so a syntax such as open("file.img", File.Write | File.Binary | File.Disk) is possible.

2022-02-16 Thread Isaac Johnson


Isaac Johnson  added the comment:

Well it wouldn't need to be imported. I was working on including it inside 
builtins like open(). It wouldn't be very convenient if it needed to be 
imported.

--

___
Python tracker 
<https://bugs.python.org/issue46766>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46766] Add a class for file operations so a syntax such as open("file.img", File.Write | File.Binary | File.Disk) is possible.

2022-02-16 Thread Isaac Johnson


Isaac Johnson  added the comment:

Well that is how it works with open. It is implemented in the io module and  
added to builtins.

--

___
Python tracker 
<https://bugs.python.org/issue46766>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com