[Python-Dev] Path PEP: some comments
"Martin v. Löwis"
martin at v.loewis.de
Sun Feb 5 14:03:28 CET 2006
Terry Reedy wrote:
>>Note that this is the opposite of normal Python policy: Python does not
>>attempt to create cross-platform abstractions, but instead chooses to
>>expose platform differences.
>
>
> I had the opposite impression about Python -- that it generally masks such
> differences.
I think it is both ways. For counter-examples, consider GUIs: Python
does *not* attempt to provide a cross-platform GUI library (Tk tries
that, but that is a different story). It also exposes os.lstat on
systems that provide it, but doesn't try to emulate it on systems
which don't. Likewise, there is a module linuxaudiodev which is only
useful on some systems, and winsound, which is only useful on others.
So first of all, Python exposes the platform API as-is, and doesn't
try to "correct" things that it thinks the system got "wrong", or
forgot to implement. On top of that, you have layers which try to
mask differences, e.g. the os module or the subprocess module.
Regards,
Martin
More information about the Python-Dev
mailing list