November 2024
Intermediate to advanced
620 pages
13h 46m
English
”Knowing yourself is the beginning of all wisdom.”
– Aristotle
In this chapter, we are going to explore the topic of type hinting. Type hinting is perhaps the biggest change introduced in Python since Python 2.2, which saw the unification of types and classes.
Specifically, we will study the following topics:
Python is both a strongly typed and a dynamically typed language.
Strongly typed means that Python does not allow implicit type conversions that could lead to unexpected behaviors. Consider the following php code:
<?php
$a = 2;
$b = "2";
echo $a + $b; // prints: ...Read now
Unlock full access