[Python-Dev] Path inherits from string (original) (raw)
Fredrik Lundh fredrik at pythonware.com
Thu Jan 26 17:35:05 CET 2006
- Previous message: [Python-Dev] Path inherits from string
- Next message: [Python-Dev] Path inherits from string
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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)
- Previous message: [Python-Dev] Path inherits from string
- Next message: [Python-Dev] Path inherits from string
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]