From f7a752e11a50896f9fa6b3936fe4ea737cda31b9 Mon Sep 17 00:00:00 2001 From: Mark Pilgrim Date: Thu, 5 Feb 2009 15:37:00 -0500 Subject: [PATCH] removed extraneous (and unclosed) div --- your-first-python-program.html | 1 - 1 file changed, 1 deletion(-) diff --git a/your-first-python-program.html b/your-first-python-program.html index 768ed58..e0359b6 100644 --- a/your-first-python-program.html +++ b/your-first-python-program.html @@ -189,7 +189,6 @@ if __name__ == "__main__":

Everything in Python is an object, and almost everything has attributes and methods. All functions have a built-in attribute __doc__, which returns the docstring defined in the function's source code. The sys module is an object which has (among other things) an attribute called path. And so forth.

Still, this doesn't answer the more fundamental question: what is an object? Different programming languages define “object” in different ways. In some, it means that all objects must have attributes and methods; in others, it means that all objects are subclassable. In Python, the definition is looser; some objects have neither attributes nor methods (more on this in [FIXME xref-was-#datatypes]), and not all objects are subclassable (more on this in [FIXME xref-was-#fileinfo]). But everything is an object in the sense that it can be assigned to a variable or passed as an argument to a function (more in this in [FIXME xref-was-#apihelp]).

This is so important that I'm going to repeat it in case you missed it the first few times: everything in Python is an object. Strings are objects. Lists are objects. Functions are objects. Even modules are objects. -

Further reading