[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Explanation of list reference

Marko Rauhamaa <marko at pacujo.net>:

> Conceptually, the "everything is a reference" and the "small"/"big"
> distinction are equivalent (produce the same outcomes). The question
> is, which model is easier for a beginner to grasp.

Case in point, if everything is a reference, how come:

   >>> "hello".__str__()
   >>> 1.__str__()
   SyntaxError: invalid syntax