Skip to content

Latest commit

 

History

History

0x06-python-classes

0x06. Python - Classes and Objects

Description

What you should learn from this project:

  • Why Python programming is awesome (don’t forget to tweet today, with the hashtag #pythoniscool :))
  • What is OOP
  • “first-class everything”
  • What is a class
  • What is an object and an instance
  • What is the difference between a class and an object or instance
  • What is an attribute
  • What are and how to use public, protected and private attributes
  • What is self
  • What is a method
  • What is the special init method and how to use it
  • What is Data Abstraction, Data Encapsulation, and Information Hiding
  • What is a property
  • What is the difference between an attribute and a property in Python
  • What is the Pythonic way to write getters and setters in Python
  • How to dynamically create arbitrary new attributes for existing instances of a class
  • How to bind attributes to object and classes
  • What is and what does contain dict of a class and of an instance of a class
  • How does Python find the attributes of an object or class
  • How to use the getattr function

  • Write an empty class Square that defines a square:
  • Write a class Square that defines a square by: (based on 0-square.py)
  • Write a class Square that defines a square by: (based on 1-square.py)
  • Write a class Square that defines a square by: (based on 2-square.py)
  • Write a class Square that defines a square by: (based on 3-square.py)
  • Write a class Square that defines a square by: (based on 4-square.py)
  • Write a class Square that defines a square by: (based on 5-square.py)
  • Write a class Node that defines a node of a singly linked list by:
  • Write a class Square that defines a square by: (based on 6-square.py)
  • Write a class Square that defines a square by: (based on 4-square.py)
  • Write the Python class MagicClass that does exactly the same as the following Python bytecode:

Author