Martin v. Löwis wrote:
I personally find the notion of "path objects" confusing. Is this a
real path name on the local system, or merely a potential one? If
potential, why does it have a .size attribute

(what is the size of a non-existing file)?

Logically (and, I feel, quite intuitively), it's an exception:

>>> from path import path
>>> path('testxxx').size
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "c:\python24\lib\ntpath.py", line 229, in getsize
    return os.stat(filename).st_size
OSError: [Errno 2] No such file or directory: u'testxxx'

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

Reply via email to