Concept map
How these ideas connect Curated relationships between topics — solid lines connect ideas within a language that build on each other, dashed teal lines cross to the genuinely equivalent concept in the other language. Hover a dot for its title, click to open the topic.
Python Java A. Object model, identity & memory B. Iteration & generators C. Functions & closures D. Classes & OOP internals E. Typing & modern syntax F. Concurrency & parallelism A. Object model, identity & memory B. Generics C. Collections framework D. Streams & functional interfaces E. Concurrency F. Exceptions G. Modern language features (8 → 21) I. Modules & misc stdlib `is` vs `==`, the small-int cache, and string interning `is` vs `==`, the s… The mutable default argument trap The mutable default… Shallow vs deep copy Shallow vs deep copy dict/set size cannot change during iteration dict/set size canno… The iterator protocol: why `for` calls `iter()` exactly once The iterator protoc… Generators: lazy, one-shot, and why they save memory Generators: lazy, o… Late-binding closures: the classic loop-variable-capture bug Late-binding closur… Positional-only (`/`) and keyword-only (`*`) parameters Positional-only (`/… `*args`/`**kwargs`: collection vs unpacking, and ordering rules `*args`/`**kwargs`:… Decorators silently destroy metadata unless you use `functools.wraps` Decorators silently… `@property`, `@staticmethod`, `@classmethod` -- and the descriptor protocol underneath `@property`, `@stat… The `__eq__`/`__hash__` contract The `__eq__`/`__has… `__repr__` vs `__str__`, and why every class should define `__repr__` `__repr__` vs `__st… Context managers: `__enter__`/`__exit__`, `contextlib.contextmanager`, `ExitStack` Context managers: `… Dataclasses: `field(default_factory=...)`, `__post_init__`, `frozen=True`, generated `__eq__` Dataclasses: `field… The walrus operator `:=` The walrus operator… `match`/`case` structural pattern matching (PEP 634) `match`/`case` stru… f-string `=` debug specifier and the format-spec mini-language f-string `=` debug … What the GIL actually protects (and what it doesn't) What the GIL actual… threading vs multiprocessing vs asyncio -- when each one actually helps threading vs multip… `==` vs `.equals()`, and the String constant pool `==` vs `.equals()`… The `Integer` autobox cache (-128..127) The `Integer` autob… The `hashCode`/`equals` contract The `hashCode`/`equ… Records: compact constructors, generated equals/hashCode/toString Records: compact co… Generics are erased at runtime Generics are erased… Bounded wildcards and PECS ("Producer Extends, Consumer Super") Bounded wildcards a… `List.of()` / `Map.of()` are truly immutable `List.of()` / `Map.… Fail-fast iterators: `ConcurrentModificationException` — and when it DOESN'T fire Fail-fast iterators… `Comparable` vs `Comparator` `Comparable` vs `Co… Streams are lazy: nothing runs until a terminal operation Streams are lazy: n… `Optional`: `orElse` (always evaluated) vs `orElseGet` (lazy) `Optional`: `orElse… Method references: all four kinds Method references: … `synchronized` and `volatile`: visibility vs. atomicity -- two different problems `synchronized` and … Virtual threads (Project Loom, Java 21) vs. platform threads Virtual threads (Pr… Checked vs. unchecked exceptions -- the actual compiler-enforced difference Checked vs. uncheck… try-with-resources, `AutoCloseable`, and suppressed exceptions try-with-resources,… `var` local type inference (Java 10+) `var` local type in… Switch expressions + pattern matching for switch + `sealed`, working together Switch expressions … Text blocks (`"""`, Java 15+) Text blocks (`"""`,… `java.time` vs. legacy `Date`/`Calendar` `java.time` vs. leg… T1 topic T2 topic T3 topic builds on Python ↔ Java equivalent