Kaydet (Commit) 3fbd7001 authored tarafından Trey Hunner's avatar Trey Hunner Kaydeden (comit) Mariatta

bpo-30466: Add brief explanation of classes to tutorial (GH-1804)

üst ab025e31
...@@ -4,6 +4,12 @@ ...@@ -4,6 +4,12 @@
Classes Classes
******* *******
Classes provide a means of bundling data and functionality together. Creating
a new class creates a new *type* of object, allowing new *instances* of that
type to be made. Each class instance can have attributes attached to it for
maintaining its state. Class instances can also have methods (defined by its
class) for modifying its state.
Compared with other programming languages, Python's class mechanism adds classes Compared with other programming languages, Python's class mechanism adds classes
with a minimum of new syntax and semantics. It is a mixture of the class with a minimum of new syntax and semantics. It is a mixture of the class
mechanisms found in C++ and Modula-3. Python classes provide all the standard mechanisms found in C++ and Modula-3. Python classes provide all the standard
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment