Coverage for sources/accretive/_docstrings.py: 100%
2 statements
« prev ^ index » next coverage.py v7.6.4, created at 2024-11-10 23:02 +0000
« prev ^ index » next coverage.py v7.6.4, created at 2024-11-10 23:02 +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[ str, str ] = _DictionaryProxy( {
29 'class attributes accretion': '''
30Prevents reassignment or deletion of class attributes after they have been
31assigned. Only assignment of new class attributes is permitted.
32''',
34 'description of class factory class': '''
35Derived from :py:class:`type`, this is a metaclass. A metaclass is a class
36factory class. I.e., it is a class that produces other classes as its
37instances.
38''',
40 'description of module': '''
41Derived from :py:class:`types.ModuleType`, this class is suitable for use as a
42Python module class.
43''',
45 'description of namespace': '''
46A namespace is an object, whose attributes can be determined from iterables and
47keyword arguments, at initialization time. The string representation of the
48namespace object reflects its current instance attributes. Modeled after
49:py:class:`types.SimpleNamespace`.
50''',
52 'dictionary entries accretion': '''
53Prevents alteration or removal of dictionary entries after they have been
54added. Only addition of new dictionary entries is permitted.
55''',
57 'dictionary entries production': '''
58When an attempt to access a missing entry is made, then the entry is added with
59a default value. Modeled after :py:class:`collections.defaultdict`.
60''',
62 'dictionary entries validation': '''
63When an attempt to add a new entry is made, then the entry is validated against
64supplied criteria. If validation fails, then the entry is rejected.
65''',
67 'instance attributes accretion': '''
68Prevents reassignment or deletion of instance attributes after they have been
69assigned. Only assignment of new instance attributes is permitted.
70''',
72 'module attributes accretion': '''
73Prevents reassignment or deletion of module attributes after they have been
74assigned. Only assignment of new module attributes is permitted.
75''',
77 'subpackage behavior: attributes accretion': '''
78Accretive data structures can grow at any time but can never shrink. An
79accretive dictionary accepts new entires, but cannot have existing entries
80altered or removed. Similarly, an accretive namespace accepts new attributes,
81but cannot have existing attributes assigned to new values or deleted.
82''',
84} )