Accordingly to Python, you only have a `self` if y...
# random
g
Accordingly to Python, you only have a
self
if you've been initiated, and could be offensive towards the uninitiated.
💯 2
k
That's wrong though, classes do have
self
-things before initialization, it's exactly what you use to initialize. (Nitpicking on a joke, I know ...)
g
It's the product of initiation process, created prior to construction but only when it's triggered... Or did I get something wrong?
k
Copy code
class Foo:
  def __init__(self):
    print(self)
    self.x = 5

Foo()
The
self
instance already exists before running init, right?
n
Thought you were talking about Python's over extensive use of
self
, aka Self Hell 🔥 ( https://news.ycombinator.com/item?id=8834687 ). I have invented a term for it: Selfitis 😆 .
t
Well how are you supposed to construct types at runtime? Is that not what dynamic typing does? At runtime, "self" is a blank slate that you can do all kinds of crazy meta things to.