Coverage for sources/accretive/_docstrings.py: 100%
3 statements
« prev ^ index » next coverage.py v7.5.4, created at 2024-07-06 17:17 +0000
« prev ^ index » next coverage.py v7.5.4, created at 2024-07-06 17:17 +0000
1# vim: set filetype=python fileencoding=utf-8:
2# -*- coding: utf-8 -*-
4#============================================================================#
5# #
6# Licensed under the Apache License, Version 2.0 (the "License"); #
7# you may not use this file except in compliance with the License. #
8# You may obtain a copy of the License at #
9# #
10# http://www.apache.org/licenses/LICENSE-2.0 #
11# #
12# Unless required by applicable law or agreed to in writing, software #
13# distributed under the License is distributed on an "AS IS" BASIS, #
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
15# See the License for the specific language governing permissions and #
16# limitations under the License. #
17# #
18#============================================================================#
21''' Docstrings table for reuse across subpackages. '''
24from types import MappingProxyType as _DictionaryProxy
27TABLE = _DictionaryProxy( {
29 'abc attributes exemption': '''
30Derived from and compatible with :py:class:`abc.ABCMeta`. The
31``__abstractmethods__`` class attribute and the class attributes, whose names
32start with ``_abc_``, are exempt from the accretion mechanism so that the
33internal method abstraction machinery can function correctly.
34''',
36 'class attributes accretion': '''
37Prevents reassignment or deletion of class attributes after they have been
38assigned. Only assignment of new class attributes is permitted.
39''',
41 'class attributes concealment': '''
42By default, all class attributes, whose names do not start with ``_``, are
43returned from an invocation of :py:func:`dir`. Additional class attributes can
44be returned, if the ``_class_attribute_visibility_includes_`` attribute is
45provided on a subclass.
46''',
48 'description of class factory class': '''
49Derived from :py:class:`type`, this is a metaclass. A metaclass is a class
50factory class. I.e., it is a class that produces other classes as its
51instances.
52''',
54 'description of module': '''
55Derived from :py:class:`types.ModuleType`, this class is suitable for use as a
56Python module class.
57''',
59 'description of namespace': '''
60A namespace is an object, whose attributes can be determined from iterables and
61keyword arguments, at initialization time. The string representation of the
62namespace object reflects its current instance attributes. Modeled after
63:py:class:`types.SimpleNamespace`.
64''',
66 'dictionary entries accretion': '''
67Prevents alteration or removal of dictionary entries after they have been
68added. Only addition of new dictionary entries is permitted.
69''',
71 'dictionary entries production': '''
72When an attempt to access a missing entry is made, then the entry is added with
73a default value. Modeled after :py:class:`collections.defaultdict`.
74''',
76 'instance attributes accretion': '''
77Prevents reassignment or deletion of instance attributes after they have been
78assigned. Only assignment of new instance attributes is permitted.
79''',
81 'instance attributes concealment': '''
82By default, all instance attributes, whose names do not start with ``_``, are
83returned from an invocation of :py:func:`dir`. Additional instance attributes
84can be returned, if the ``_attribute_visibility_includes_`` attribute is
85provided on a subclass.
86''',
88 'module attributes accretion': '''
89Prevents reassignment or deletion of module attributes after they have been
90assigned. Only assignment of new module attributes is permitted.
91''',
93 'module attributes concealment': '''
94By default, all module attributes, whose names do not start with ``_``, are
95returned from an invocation of :py:func:`dir`. Additional module attributes
96can be returned, if the ``_attribute_visibility_includes_`` attribute is
97provided on a subclass.
98''',
100 'protection of class': '''
101Enforcement of attributes accretion on this class, itself, is in effect.
102''',
104 'protection of class factory class': '''
105Enforcement of attributes accretion on this metaclass, itself, is in effect.
106''',
108 'protection of module class': '''
109Enforcement of attributes accretion on this module class, itself, is in effect.
110''',
112 'subpackage behavior: attributes accretion': '''
113Accretive data structures can grow at any time but can never shrink. An
114accretive dictionary accepts new entires, but cannot have existing entries
115altered or removed. Similarly, an accretive namespace accepts new attributes,
116but cannot have existing attributes assigned to new values or deleted.
117''',
119 'subpackage behavior: attributes concealment': '''
120Data structures, provided by this subpackage, have concealed attributes.
121Concealed attributes do not appear in listings via the :py:func:`dir` builtin
122function. By default, only attributes names, which do not start with ``_`` are
123made visible, but additional attributes can be included if they are listed on a
124particular class attribute that the concealer honors.
125''',
127 'subpackage behavior: protection of classes': '''
128Classes of data structures, provided by this subpackage, have protected
129attributes. Attributes are accreted on these classes and cannot be reassigned
130or deleted.
131''',
133} )
136__all__ = ( )