On 9 May 2013 14:07, Roy Smith <r...@panix.com> wrote:
> In article <518b32ef$0$11120$c3e8...@news.astraweb.com>,
>  Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info> wrote:
>
>> There is no sensible use-case for creating a file without opening it.
>
> Sure there is.  Sometimes just creating the name in the file system is
> all you want to do.  That's why, for example, the unix "touch" command
> exists.

Wouldn't the code that implements the touch command just look
something like this:

f = open(filename)
f.close()

Or is there some other way of creating the file that doesn't open it
(I mean in general not just in Python)?


Oscar
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to