01-Hosting | Domain info

What/why use domain and DNS records overview

πŸ“… Mar 1, 2022

Domains

What Is a Domain?

  • Domain is the name of a website
  • Domain name points to the website server IP so that you don’t have to remember the complicated IP addresses
  • The IP address is the equivalent of this physical address, but for the web.
  • Your home’s address allows people, or your GPS, to find and navigate to your home, while your IP address tells web browsers where to go to display your website.
  • Use ping google.com to find google.com IP
Read More β†’

OOPs | 06-Magic Methods

Dunder, Magic, Special Methods

πŸ“… Feb 10, 2023

Magic Methods

Magic Methods are also known as Dunder methods, Special methods

Python dunder methods are the special predefined methods having two prefixes and two suffix underscores in the method name. Here, the word dunder means double under (underscore).

These special dunder methods are used in case of operator overloading (they provide extended meaning beyond the predefined meaning to an operator).

Read More β†’

OOPs | 05-Inheritance

Inheritance

πŸ“… Feb 9, 2023

5. Inheritance

It is a mechanism that allows you to create a hierarchy of classes that share a set of properties and methods by deriving a class from another class. Inheritance is the capability of one class to derive or inherit the properties from another class.

  • It specifies that the child object acquires all the properties and behaviors of the parent object.
  • It provides re-usability of the code.
Read More β†’

OOPs | 04-Encapsulation

Access Modifier

πŸ“… Feb 8, 2023

4.1 Encapsulation in Python

  • Access modifier are useful to attain encapsulation
  • It is archived by access modifiers public, private, protected

Python does not have strong distinctions between private and public variables like Java does.

There is no private-ness in python, as one of Python principles says –> We're all adults

# They just follow convention
Single underscore `_`
    --> its suppose to be protected
Double underscore `__`
    --> Do not use this field directly

# It is called Name Mangling
Read More β†’

Python intermediate | 03-Type Checking

Type Checking/Annotations in Python

πŸ“… Oct 18, 2021

Type Checking/Annotations in Python

  • Type Annotations are a new feature added in PEP 484 that allow for adding type hints to variables.
  • They are used to inform someone reading the code what the type of a variable should be.
  • This brings a sense of statically typed control to the dynamically typed Python
  • Usage
    • Annotate Argument
    • Annotate Return type
    • Annotate Variable
Read More β†’