Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python

classes / libraries/ modules

We studied classes as being essentially an object that has Methods and attributes. I've also heard of classes being described as libraries. Is a library essentially the same as a class; a collection of methods?

Is logging a library or class or is it the same thing and what is a module??

Thanks for any help.

Henry

2 Answers

A module is a collection of classes, functions and/or constants. You can import these and use them as if they were written inside your current script. This is so you don't have to rewrite tons of code to do simple stuff.

A Library is a collection of modules. (or just one module)

To answer your question about "logging":

Logging is a module from the standard library

Thanks!