08.01.18 11:11, Pablo Galindo Salgado пише:
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.

I would pass a sequence like:

[(os.close, 0),
 (os.open, 1, '/tmp/mylog', os.O_WRONLY, 0o700),
 (os.dup2, 1, 2),
]

_______________________________________________
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