deep·tech·intuition
beginner 18 min read ·

Python Fundamentals

The Python mental model — values, references, scopes, and the data model that ties them together.

Why Python feels the way it does

Python’s design choices — everything-is-an-object, late binding, duck typing — aren’t accidents. They’re the result of optimizing for readable code that scales with the size of your team, not for raw runtime speed.

If you internalize the data model, almost every “weird” Python behavior becomes obvious.

Names, not variables

Python has names bound to objects, not variables holding values. This explains:

a = [1, 2, 3]
b = a
b.append(4)
print(a)  # [1, 2, 3, 4]

a and b are two names for the same list object. Mutating through one shows up under the other.

Everything is an object

Functions, classes, modules — all first-class values. This is what makes decorators, dynamic dispatch, and metaprogramming feel natural.

def shout(fn):
    def inner(s):
        return fn(s).upper()
    return inner

@shout
def greet(name):
    return f"hello {name}"

greet("ada")  # "HELLO ADA"

Where to go next

  • HTTP fundamentals (the protocol your services will speak)
  • FastAPI (the modern Python web framework)
  • SQLAlchemy (data persistence done right)