On 8 January 2018 at 19:11, Pablo Galindo Salgado <pablog...@gmail.com> wrote:
> Following Gregory's comment on the PR I understand that he is proposing to
> have three objects in the os module representing each action and pass a
> sequence of these objects to the Python API. What I am not sure about this
> is that there is no previous example of such classes in the os module for
> other similar APIs and therefore I am not sure if there is a better
> approach.

Probably the closest prior art would be the os.DirEntry objects used
for the items yielded from os.scandir - that is the same general idea
(a dedicated Python class to represent a C struct), just in the other
direction.

As with DirEntry, I don't see any obvious value in making the new
objects iterable though - we should be able to just use named field
access in both the C and Python APIs.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to