Le 24/01/2016 08:58, Vincent Vande Vyvre a écrit :
Hi,

Refering to the doc https://docs.python.org/3/library/pathlib.html?highlight=pathlib#pathlib.PurePath.path

----------------------------------------------------------------------------
Python 3.4.3 (default, Oct 14 2015, 20:28:29)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from pathlib import PurePath
>>> p = PurePath('/home/vincent/Images')
>>> p.name
'Images'
>>> p.suffix
''
>>> p.parent
PurePosixPath('/home/vincent')
>>> [parent for parent in p.parents]
[PurePosixPath('/home/vincent'), PurePosixPath('/home'), PurePosixPath('/')]
>>> p.path
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'PurePosixPath' object has no attribute 'path'
----------------------------------------------------------------------------

Am I misunderstood the doc ?


OOps, is new in 3.4.5

Sorry for the noise.

Vincent
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to