On Fri, May 10, 2013 at 4:59 AM, Roy Smith <r...@panix.com> wrote: > It's not hard to imagine a > file class which could be used like: > > f = file("/path/to/my/file") > f.delete() > > That would be a totally different model from the current python file > object. And then there would be plenty of things you might want to do > to a file other than open it... > > file("/path/to/my/directory").chdir() > file("/dev/sdf").mount("/var/lib/whatever") > file("/mnt/swapfile").swapon()
Sure, you can imagine it. But what does it do that can't be done with a moduleful of flat functions accepting strings? This makes sense in Java, I guess, but why do it in Python? ChrisA -- http://mail.python.org/mailman/listinfo/python-list