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

1# vim: set filetype=python fileencoding=utf-8: 

2# -*- coding: utf-8 -*- 

3 

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#============================================================================# 

19 

20 

21''' Docstrings table for reuse across subpackages. ''' 

22 

23 

24from types import MappingProxyType as _DictionaryProxy 

25 

26 

27TABLE = _DictionaryProxy( { 

28 

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''', 

35 

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''', 

40 

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''', 

47 

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''', 

53 

54 'description of module': ''' 

55Derived from :py:class:`types.ModuleType`, this class is suitable for use as a 

56Python module class. 

57''', 

58 

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''', 

65 

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''', 

70 

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''', 

75 

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''', 

80 

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''', 

87 

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''', 

92 

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''', 

99 

100 'protection of class': ''' 

101Enforcement of attributes accretion on this class, itself, is in effect. 

102''', 

103 

104 'protection of class factory class': ''' 

105Enforcement of attributes accretion on this metaclass, itself, is in effect. 

106''', 

107 

108 'protection of module class': ''' 

109Enforcement of attributes accretion on this module class, itself, is in effect. 

110''', 

111 

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''', 

118 

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''', 

126 

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''', 

132 

133} ) 

134 

135 

136__all__ = ( )