pyobjc / pyobjc-core / Doc / api / module-PyObjCTools.KeyValueCoding.rst

Full commit

:mod:`PyObjCTools.KeyValueCoding` -- Key-Value Coding API

Support for Key-Value Coding in Python. This provides a simple functional interface to Cocoa's Key-Value coding that also works for regular Python objects.

Key-Value Coding is Cocoa functionality that is simular to the :func:`getattr` and :func:`setattr` functions in Python. The APIs in this module are modelled on those functions and work on Cocoa objects as well as basic Python objects.

Key-Value Coding works with keys, basically attribute names, as well as key-paths. A key-path is a string that contains a sequence of dot-separated keys and is used to chain a number of keys together.

Accessor functions

Key-Value Coding wrapper

This wrappers value in an object that uses KeyValue Coding to implement the attribute and item accessors.