Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #102074
| From | Vincent Vande Vyvre <vincent.vande.vyvre@telenet.be> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Attribute path not in PurePosixPath ? |
| Date | 2016-01-24 08:58 +0100 |
| Message-ID | <mailman.198.1453622731.15297.python-list@python.org> (permalink) |
| References | <f7ec5b27-8155-4e07-b556-157434209680@googlegroups.com> <56a475a2$0$1524$c3e8da3$5496439d@news.astraweb.com> |
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 ?
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Calculating longitudinal acceleration, lateral acceleration and normal acceleration Robert James Liguori <gliesian66@gmail.com> - 2016-01-23 16:27 -0800
Re: Calculating longitudinal acceleration, lateral acceleration and normal acceleration Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-01-24 17:29 +1100
Re: Calculating longitudinal acceleration, lateral acceleration and normal acceleration Bernardo Sulzbach <mafagafogigante@gmail.com> - 2016-01-24 04:33 -0200
Re: Calculating longitudinal acceleration, lateral acceleration and normal acceleration Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-01-24 17:56 +1100
Attribute path not in PurePosixPath ? Vincent Vande Vyvre <vincent.vande.vyvre@telenet.be> - 2016-01-24 08:58 +0100
Re: Attribute path not in PurePosixPath ? Vincent Vande Vyvre <vincent.vande.vyvre@telenet.be> - 2016-01-24 10:00 +0100
Re: Calculating longitudinal acceleration, lateral acceleration and normal acceleration Grant Edwards <invalid@invalid.invalid> - 2016-01-24 16:46 +0000
Re: Calculating longitudinal acceleration, lateral acceleration and normal acceleration Pete Dowdell <contact@stridebird.com> - 2016-01-24 13:46 +0700
csiph-web