Python (1) - OOP and Python

in #python6 years ago (edited)
  1. Object Oriented Programming (OOP) - A code organization model that tries to encapsulate the real-world into code. It achieves this by using 'objects' or 'classes'.

  2. A 'class' is the mechanism used to create objects; It encapsulates all attributes of the object.

  3. Classes can contain :

  • Data to represent (i.e. coordinates of a Point, face value of a Loan) - also known as 'attributes'
  • An initialization function to initialize any instance-specific data (i.e. coordinates of a Point or face value of a Loan)
  • Methods (functions) that the object can perform
  1. Python provides a powerful OOP toolset but it is not a pure OOP language.

Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.032
BTC 61227.60
ETH 3022.96
USDT 1.00
SBD 3.88