Introduce constant: `pathlib.null_path`
What do you think about introducing this constant in the `pathlib` module: null_path = pathlib.Path('\\Device\\Null') if os.name = 'nt' else pathlib.Path('/dev/null') Thanks, Ram.
Ram Rachum <ram.rachum@...> writes:
What do you think about introducing this constant in the `pathlib` module: null_path = pathlib.Path('\\Device\\Null') if os.name = 'nt' else
pathlib.Path('/dev/null') = What's wrong with pathlib.Path(os.devnull)?
There is already os.path.devnull. Victor Le 4 janv. 2014 23:48, "Ram Rachum" <ram.rachum@gmail.com> a écrit :
What do you think about introducing this constant in the `pathlib` module:
null_path = pathlib.Path('\\Device\\Null') if os.name = 'nt' else pathlib.Path('/dev/null')
Thanks, Ram.
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
Cool, I didn't know about that. Thanks! On Sun, Jan 5, 2014 at 1:25 AM, Benjamin Peterson <benjamin@python.org>wrote:
Ram Rachum <ram.rachum@...> writes:
What do you think about introducing this constant in the `pathlib`
null_path = pathlib.Path('\\Device\\Null') if os.name = 'nt' else
module: pathlib.Path('/dev/null') = What's wrong with pathlib.Path(os.devnull)?
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
--
--- You received this message because you are subscribed to a topic in the Google Groups "python-ideas" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/python-ideas/eXtl40Ysgu8/unsubscribe. To unsubscribe from this group and all its topics, send an email to python-ideas+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
participants (4)
-
Benjamin Peterson
-
Ram Rachum
-
Ram Rachum
-
Victor Stinner