arogozhnikov / python3_with_pleasure

A short guide on features of Python 3 with examples
3.63k stars 242 forks source link

pathlib.Path.parts is not a method it is a property #9

Closed VPashkov closed 6 years ago

VPashkov commented 6 years ago

There is a small inaccuracy in the pathlib description:

Also pathlib.Path" has a bunch of methods, that every python novice previously had to google: ... p.parts() ...

But "parts" is not a method, it is a property. One should write p.parts instead of p.parts().

arogozhnikov commented 6 years ago

Thanks for pointing!