Thank you, Clément! We use instance var on class side is to implement singleton, for example. Iâve never used a class var and I am wondering what is a the most common use of such a variable? Cheers, R
On 07 Jan 2015, at 17:57, Clément Bera <bera.clement@gmail.com> wrote:
A class variable is shared between the class, its subclasses, its instances and its subclasses instances.
An instance variable of a class is a regular instance variable (can be accessed only by the object holding it, in this case, the class and its subclasses have all an instance variable with potentially different objects in it).
2015-01-07 17:40 GMT+01:00 Roberto Minelli <roberto.minelli@usi.ch>: Hi guys,
Can anyone please quickly explain to me the difference between (1) an instance variable defined on the class side and (2) a class variable defined on the instance side?
Thanks a lot!
Cheers, Roberto