1

Is it wrong to refer to Python modules and packages as "libraries" ? Is there a technical differense ? Python documentation never mentions the word "library" in the packages or modules entry, but always refers to Pythons' built-in code as "library".

0

1 Answer 1

3

What's in a name? But as we are at it: 'library' is no technical/syntactical term in python and there is no organisational structure that would you call a python library. officially specified or mandatory way how you would organize your files and directories in your repository in order to call your project/package/module a library (while package is basically a directory with a __init__.py and a module is a *.py file.)

But that term is widely used for modules and packages which provide a collection of features, functions, classes and so on for other python projects and applications. You would call them a library as they are not intended to be a stand-alone application.

E.g. gentoo's portage is a python application while urllib is a library. There are python packages where this not so clear, like nosetests - I implement some of their classes and methods as if it is a library but then I call nosetests from the command line as if it is a stand-alone application.

As @StefanPochmann pointed out, there is a thing called 'The Python Standard Library'.

2
  • @StefanPochmann: Sorry, wrong term. See my edit, I hope I made myself clear now.
    – nCessity
    Commented Jun 24, 2017 at 9:07
  • Yeah, I think now it's ok :) Commented Jun 24, 2017 at 9:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.