[Python-Dev] Path inherits from string (original) (raw)

Fredrik Lundh fredrik at pythonware.com
Thu Jan 26 17:35:05 CET 2006


BJörn Lindqvist wrote:

However, I might be wrong because according to [1] it should work. And having to wrap the Path object in str() (open(str(somepath))) each and every time the called function expects a string is not a practical solution.

in Python, the usual way to access an attribute of an object is to access the attribute; e.g.

f = open(p.name)


More information about the Python-Dev mailing list