Difference between revisions of "Classes"

From wikieduonline
Jump to navigation Jump to search
(Created page with "wikipedia:Classes {{Programming}}")
Tags: Mobile web edit, Mobile edit
 
 
(15 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
[[wikipedia:Classes]]
 
[[wikipedia:Classes]]
  
 +
* [[Python]] https://docs.python.org/3/tutorial/classes.html
 +
[[global]]
 +
[[nonlocal]]
  
{{Programming}}
+
 
 +
class Dog:
 +
    mykind = 'canine'        # class variable shared by all instances
 +
    def __init__(self, name):
 +
        self.name = name    # instance variable unique to each instance
 +
 
 +
Empty class <code>MyEmployee</code>
 +
class MyEmployee:
 +
    pass
 +
 
 +
 
 +
== Related ==
 +
* [[Methods]]
 +
* [[Inheritance]]
 +
* [[Iterators]] https://docs.python.org/3/tutorial/classes.html#iterators
 +
* [[Generators]] https://docs.python.org/3/tutorial/classes.html#generators
 +
 
 +
== See also ==
 +
* {{Python}}
 +
* {{Programming}}
 +
 
 +
[[Category:Programming]]

Latest revision as of 17:57, 3 March 2022

Advertising: