[Python-Dev] Alternative path suggestion (original) (raw)
Giovanni Bajo rasky at develer.com
Sat May 6 01:12:33 CEST 2006
- Previous message: [Python-Dev] Alternative path suggestion
- Next message: [Python-Dev] Alternative path suggestion
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Noam Raphael <noamraph at gmail.com> wrote:
The only drawback I can see in using a logical representation is that giving a path object to functions which expect a path string won't work. The immediate solution is to simply use str(p) instead of p. The long-term solution is to make all related functions accept a path object.
I'm not an expert in this field, but I believe that if you can make your Path object support the so-called buffer interface, it would be directly usable for functions like open() without an explicit conversion.
Giovanni Bajo
- Previous message: [Python-Dev] Alternative path suggestion
- Next message: [Python-Dev] Alternative path suggestion
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]