Skip to main content
Improves post formatting.
Source Link
kenorb
  • 168.5k
  • 95
  • 712
  • 796

Classes are objects with atributesattributes (state, characteristic) and methods (functions, capacities) that are specific for that object (like the white color and fly powers,respectively respectively, for a duck).

When you create an instance of a class, you can give it some initial personality (state or character like the name and the color of her dress for a newborn). You do this with __init__.

Basically __init__ sets the instance characteristics automatically when you call

   instance = MyClass(some_individual_traits).

Classes are objects with atributes (state, characteristic) and methods (functions, capacities) that are specific for that object (like the white color and fly powers,respectively, for a duck).

When you create an instance of a class, you can give it some initial personality (state or character like the name and the color of her dress for a newborn). You do this with __init__.

__init__ sets the instance characteristics automatically when you call

 instance = MyClass(some_individual_traits)

Classes are objects with attributes (state, characteristic) and methods (functions, capacities) that are specific for that object (like the white color and fly powers, respectively, for a duck).

When you create an instance of a class, you can give it some initial personality (state or character like the name and the color of her dress for a newborn). You do this with __init__.

Basically __init__ sets the instance characteristics automatically when you call  instance = MyClass(some_individual_traits).

added 11 characters in body
Source Link
joaquin
  • 86k
  • 31
  • 146
  • 155

Classes are objects with atributes (state, characteristic) and methods (functions, capacities) that are specific for that object (like the white color (characteristic state) and fly powers (method),respectively, for a duck).

When you create an instance of a class, you can give it some initial personality (likestate or character like the name and the color of her dress for a newborn). You do this with __init__.

__init__ sets the instance characteristics which are set automatically when you call   

myinstanceinstance = MyClass(some_individual_traits)

Classes are objects with atributes (state) and methods (functions) that are specific for that object (like the white color (characteristic state) and fly powers (method) for a duck).

When you create an instance of a class, you can give it some initial personality (like the name and the color of her dress for a newborn). You do this with __init__.

__init__ sets the instance characteristics which are set automatically when you call  myinstance = MyClass()

Classes are objects with atributes (state, characteristic) and methods (functions, capacities) that are specific for that object (like the white color and fly powers,respectively, for a duck).

When you create an instance of a class, you can give it some initial personality (state or character like the name and the color of her dress for a newborn). You do this with __init__.

__init__ sets the instance characteristics automatically when you call 

instance = MyClass(some_individual_traits)

Source Link
joaquin
  • 86k
  • 31
  • 146
  • 155

Classes are objects with atributes (state) and methods (functions) that are specific for that object (like the white color (characteristic state) and fly powers (method) for a duck).

When you create an instance of a class, you can give it some initial personality (like the name and the color of her dress for a newborn). You do this with __init__.

__init__ sets the instance characteristics which are set automatically when you call myinstance = MyClass()