[Python-3000] PEP: Cleaning out sys and the "interpreter" module

Guido van Rossum guido at python.org
Tue Apr 8 23:28:22 CEST 2008


On Tue, Apr 8, 2008 at 2:25 PM, Benjamin Peterson
<musiccomposition at gmail.com> wrote:
>
> On Tue, Apr 8, 2008 at 4:07 PM, Guido van Rossum <guido at python.org> wrote:
>  > On Tue, Apr 8, 2008 at 1:34 PM, Benjamin Peterson
>  >  <musiccomposition at gmail.com> >  Another thought: Even if other
>  >
>  > implementations provide these
>  >  >  functions, it doesn't really mean they are compatible. Allowing each
>  >  >  implementation to have their own interpreter module can clear up
>  >  >  confusion regarding how much they support what is returned.
>  >
>  >  That's not the Python spirit. The spirit is that *if* they support
>  >  similar enough functionality the APIs should be named the same, in the
>  >  same module, and have the same signature. E.g. the os module is built
>  >  on this principle. Many APIs there are optional, but if they exist,
>  >  they have a known name and spec. (The posix/nt underlying modules are
>  >  implementation details that most users never need to know about.)

>  You can't expect people to write the same implementation as you,
>  though. Take an implementation (imaginary for the moment) that has a
>  frame-like object, but is barred from exposing it because it doesn't
>  have the same API as the CPython one. You could argue too that
>  exposing an internal object with the ugly name _getframe is hardly
>  pythonic to begin with. ;)

Eh? They provide compatible APIs using different implementations all the time.

Really, this is getting exasperating.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-3000 mailing list