This code produces an error message, which I found surprising:
class Foo(object): custom = 1 def __init__(self, custom=Foo.custom): self._custom
The class body is executed before the class its self is defined, so default argument values can't reference the class. Just making custom the default (without class qualification) should work.
custom