Re:Show HN: I Wrote a Book on Java
by cbsmith on Tuesday September 24, 2024 @11:47AM
(#41637831)
Python classes are basically dictionaries that have a distinct type bound to them. Alternatively you can subclass from dictionary to give yourself a distinct type but still be a dictionary. Slotted classes are basically named tuples (and of course, Python has actual named tuples and dataclasses), so there's a lot of ways to "tag" a collection with a specific type in mind.
[ Parent
| on HN ]
Re:Show HN: I Wrote a Book on Java
by sodapopcan on Tuesday September 24, 2024 @12:35PM
(#41638317)
A typed dict is more like what I mean. Obviously I know about classes as I'm no stranger to OO.