var is a shared variable, of course. Use this when you do not want to make any further differences to the variable you are documenting.
ivar is an "instance variable" or a variable defined for an instance of an object (an instance of a class). Usually they will be defined (in Python) inside the __init__ method.
cvar is a "class variable" or a variable that is directly set to a class object. Typically, this would be set inside the class operator, but outside of any particular method in the class.
Here is an example:
class SomeClass(object): cvar = 'I am a class variable' def __init__(self): self.ivar = 'I am an instance variable'
source share