Skip to content

ScopedObject

An object that holds a value then allows users to access attributes. But you can change which attributes to read.

__init__(self, obj, attributes=[]) special

Creates a new ScopedObject.

Parameters:

Name Type Description Default
obj Any

The object will be inserted to the ScopedObject.

required
attributes List[str]

A list of attributes that users can read from the object. Note that it only restricts for reading attributes, not for setting attributes.

[]