Constructor

Applies to: general, python, cpp

A constructor initializes a new object so it starts in a valid state before other code uses it.

class Pose:
    def __init__(self, x):
        self.x = x

See also: class, object