Think Python –– 15.1 User-defined types - Allen Downey

This quote was added by keynasty
A user-defined type is also called a class. A class definition looks like this: class Point(object): """Representing a point in 2-D space.""" This header indicates that the new class is a Point, which is a kind of object, which is a built-in type. The body is a docstring that explains what the class is for. You can define variables and functions inside a class definition.

Train on this quote


[Archived]
Rate this quote:
1.9 out of 5 based on 7 ratings.

Edit Text

Edit author and title

(Changes are manually reviewed)

or just leave a comment:


Test your skills, take the Typing Test.

Score (WPM) distribution for this quote. More.

Best scores for this typing test

Name WPM Accuracy

Recently for

Name WPM Accuracy