Re: [Python-Dev] PEP 355 status

2006-10-25 Thread stephen
Scott Dial writes: [EMAIL PROTECTED] wrote: Talin writes: (one additional postscript - One thing I would be interested in is an approach that unifies file paths and URLs so that there is a consistent locator scheme for any resource, whether they be in a filesystem, on a

Re: [Python-Dev] PEP 355 status

2006-10-25 Thread Talin
Scott Dial wrote: [EMAIL PROTECTED] wrote: Talin writes: (one additional postscript - One thing I would be interested in is an approach that unifies file paths and URLs so that there is a consistent locator scheme for any resource, whether they be in a filesystem, on a web server,

Re: [Python-Dev] __str__ bug?

2006-10-25 Thread M.-A. Lemburg
Mike Krell wrote: class S(str): def __str__(self): return S.__str__ class U(unicode): def __str__(self): return U.__str__ print str(S()) print str(U()) This script prints: S.__str__ U.__str__ Yes, but print U() prints nothing, and the explicit str() should not be

Re: [Python-Dev] PEP 355 status

2006-10-25 Thread Nick Coghlan
Talin wrote: Part 3: Does this mean that the current API cannot be improved? Certainly not! I think everyone (well, almost) agrees that there is much room for improvement in the current APIs. They certainly need to be refactored and recategorized. But I don't think that the solution is

Re: [Python-Dev] __str__ bug?

2006-10-25 Thread Martin v. Löwis
Mike Krell schrieb: Based on the behaviour of str and the fact that overriding unicode.__repr__ works just fine, I'd say file a bug on SF. Done. This is item 1583863. Of course, it would be even better if you could also include a patch. Regards, Martin

Re: [Python-Dev] PEP 355 status

2006-10-25 Thread Talin
Nick Coghlan wrote: Talin wrote: Part 3: Does this mean that the current API cannot be improved? Certainly not! I think everyone (well, almost) agrees that there is much room for improvement in the current APIs. They certainly need to be refactored and recategorized. But I don't think

Re: [Python-Dev] PEP 355 status

2006-10-25 Thread Phillip J. Eby
At 09:49 AM 10/25/2006 -0700, Talin wrote: Having done a path library myself (in C++, for our code base at work), the trickiest part is getting the Windows path manipulations right, and fitting them into a model that allows writing of platform-agnostic code. This is especially vexing when you

Re: [Python-Dev] PEP 355 status

2006-10-25 Thread Talin
Phillip J. Eby wrote: At 09:49 AM 10/25/2006 -0700, Talin wrote: Having done a path library myself (in C++, for our code base at work), the trickiest part is getting the Windows path manipulations right, and fitting them into a model that allows writing of platform-agnostic code. This is

Re: [Python-Dev] PEP 355 status

2006-10-25 Thread Fred L. Drake, Jr.
On Wednesday 25 October 2006 13:16, Talin wrote: Never heard of it. Its not in the standard library, is it? I don't see it in the table of contents or the index. This is a documentation bug. :-( I'd thought they were mentioned *somewhere*, but it looks like I'm wrong. os.path is an alias

Re: [Python-Dev] PEP 355 status

2006-10-25 Thread Phillip J. Eby
At 10:16 AM 10/25/2006 -0700, Talin wrote: Phillip J. Eby wrote: At 09:49 AM 10/25/2006 -0700, Talin wrote: Having done a path library myself (in C++, for our code base at work), the trickiest part is getting the Windows path manipulations right, and fitting them into a model that allows

Re: [Python-Dev] PEP 355 status

2006-10-25 Thread Fredrik Lundh
Talin wrote: You probably want to use the posixpath module directly in that case, though perhaps you've already discovered that. Never heard of it. Its not in the standard library, is it? I don't see it in the table of contents or the index. http://effbot.org/librarybook/posixpath.htm

[Python-Dev] Fwd: Re: ANN compiler2 : Produce bytecode from Python 2.5 AST

2006-10-25 Thread Michael Spencer
Martin v. Löwis wrote: Georg Brandl schrieb: Perhaps you can bring up a discussion on python-dev about your improvements and how they could be integrated into the standard library... Let me second this. The compiler package is largely unmaintained and was known to be broken (and perhaps

Re: [Python-Dev] PEP 355 status

2006-10-25 Thread Greg Ewing
Talin wrote: (Actually, the OOP approach has a slight advantage in terms of the amount of syntactic sugar available, Even if you don't use any operator overloading, there's still the advantage that an object provides a namespace for its methods. Without that, you either have to use fairly

Re: [Python-Dev] PEP 355 status

2006-10-25 Thread Talin
Greg Ewing wrote: Talin wrote: (Actually, the OOP approach has a slight advantage in terms of the amount of syntactic sugar available, Even if you don't use any operator overloading, there's still the advantage that an object provides a namespace for its methods. Without that, you either

Re: [Python-Dev] PEP 355 status

2006-10-25 Thread Greg Ewing
Talin wrote: Ideally, you should be able to pass file:///... to a regular open function. I'm not so sure about that. Consider that file:///foo.bar is a valid relative pathname on Unix to a file called foo.bar in a directory called file:. That's not to say there shouldn't be a function