Is the Python standard library really standard?

前端 未结 3 1339
盖世英雄少女心
盖世英雄少女心 2021-01-18 21:16

Is the Python standard library standard in the sense that if Python is installed, then the standard library is installed too?

The documentation reads

相关标签:
3条回答
  • 2021-01-18 21:34

    It's not a Python issue. You can teach that the batteries are included. They are.

    It's the distributions that are incomplete.

    We've been unhappy with the Red Hat Enterprise Linux having old versions of Python. However, there are recipes for upgrades.

    It's a common security practice to turn off all developer packages, leaving Python incomplete. This is a common situation outside Python and outside the essential Linux distribution.

    Batteries are included under normal circumstances. But, it's also very easy to strip some or all of the batteries. And many organizations will -- for a variety of reasons -- create incomplete libraries.

    It's not Python. It's the environments that are incomplete.

    0 讨论(0)
  • 2021-01-18 21:44

    It depends on the distribution packager. For example on Debian the profiling modules profile and cprofile are installed separately as python-profiler. Other modules may be separated like this too on different distributions.

    0 讨论(0)
  • 2021-01-18 21:47

    Generally yes -- everything not listed in the optional section will always be available.

    These are some of the things that may vary from OS to OS installation: http://docs.python.org/library/someos.html

    You probably won't use these unless you're doing fairly advanced programming.

    0 讨论(0)
提交回复
热议问题