GithubHelp home page GithubHelp logo

oops_python's Introduction

Object-oriented programming (OOP) refers to a type of computer programming (software design) in which programmers define not only the data type of a data structure, but also the types of operations (functions) that can be applied to the data structure.

Python Classes/Objects

Python is an object oriented programming language. Almost everything in Python is an object, with its properties and methods.

Overview of OOP Terminology

Class − A class can be defined as a template/blueprint that describes the behavior/state that the object of its type support class is a user defined data type, which holds its own data members and member functions

Object Object is simply a collection of data (variables) and methods (functions) that act on those data. And, class is a blueprint for the object.

Instance variable − A variable that is defined inside a method and belongs only to the current instance of a class.

Class Variable* - A variable that is defined inside a class and shared by all instance of the class

Encapsulation - Hiding the private details of a class from other objects.

Inheritance − The transfer of the characteristics of a class to other classes that are derived from it.

Polymorphism - is an ability (in OOP) to use common interface for multiple form (data types).

Data Abstraction - Data abstraction and encapsulation are synonymous as data abstraction is achieved through encapsulation. Abstraction is used to hide internal details and show only functionalities. Abstracting something means to give names to things, so that the name captures the basic idea of what a function or a whole program does.

Instance − An individual object of a certain class. An object obj that belongs to a class Circle, for example, is an instance of the class Circle.

Instantiation − The creation of an instance of a class.

Method − A special kind of function that is defined in a class definition.

Operator overloading − The assignment of function to a particular operator. https://www.programiz.com/python-programming/operator-overloading

Function overloading − The assignment of more than one behavior to a particular function. The operation performed varies by the types of objects or arguments involved.

oops_python's People

Contributors

amirkhan1092 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.