worktoy 1.2.0.dev1__tar.gz → 1.2.0rc0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (207) hide show
  1. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/PKG-INFO +2 -2
  2. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/README.md +1 -1
  3. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/pyproject.toml +1 -1
  4. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/__init__.py +1 -1
  5. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/core/_object.py +9 -7
  6. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/core/control_flow/__init__.py +3 -2
  7. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/core/control_flow/_control_space.py +9 -4
  8. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/desc/__init__.py +6 -3
  9. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/desc/_attri_box.py +55 -4
  10. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/desc/_base_descriptor.py +1 -3
  11. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/desc/_field.py +0 -9
  12. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/dispatch/_dispatcher.py +0 -1
  13. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/dispatch/_overload.py +0 -1
  14. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/ezdata/_ez_field.py +8 -2
  15. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/ezdata/_ez_hook.py +20 -11
  16. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/ezdata/_ez_meta.py +4 -4
  17. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/ezdata/_ez_space.py +1 -2
  18. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/keenum/_kee_flag.py +13 -10
  19. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/keenum/_kee_member.py +17 -5
  20. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/keenum/_kee_space.py +1 -2
  21. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/keenum/_kee_space_hook.py +1 -5
  22. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/mcls/_abstract_metaclass.py +6 -2
  23. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/mcls/_abstract_namespace.py +3 -3
  24. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/mcls/space_hooks/_abstract_space_hook.py +1 -5
  25. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/utilities/_bipartite_matching.py +0 -8
  26. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/utilities/_join_words.py +11 -0
  27. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/utilities/_resolve_mro.py +11 -0
  28. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/utilities/_string_list.py +11 -0
  29. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/utilities/_text_fmt.py +20 -0
  30. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/utilities/_type_cast.py +47 -12
  31. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/utilities/_unpack.py +11 -0
  32. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/utilities/_word_wrap.py +11 -0
  33. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/utilities/combinatorics/_arrangement.py +0 -1
  34. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/utilities/combinatorics/_arrangements.py +0 -3
  35. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/__init__.py +6 -2
  36. worktoy-1.2.0rc0/src/worktoy/waitaminute/_redundant_keyword.py +64 -0
  37. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/_risk_warning.py +1 -1
  38. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/_type_exception.py +5 -7
  39. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/_unpack_exception.py +1 -1
  40. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/_variable_not_none.py +2 -2
  41. worktoy-1.2.0rc0/src/worktoy/waitaminute/_work_toy_exception.py +51 -0
  42. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/desc/_not_a_descriptor.py +2 -4
  43. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/desc/_phantom_box_error.py +2 -1
  44. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/desc/_protected_error.py +12 -3
  45. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/desc/_read_only_error.py +2 -2
  46. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/desc/_without_exception.py +5 -2
  47. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/desc/_write_once_error.py +3 -3
  48. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/dispatch/_dispatch_exception.py +1 -2
  49. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/dispatch/_type_cast_exception.py +2 -2
  50. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/ezdata/_reserved_field_error.py +3 -1
  51. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/keenum/_kee_box_exception.py +1 -1
  52. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/keenum/_kee_box_type_error.py +1 -1
  53. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/keenum/_kee_box_value_error.py +2 -2
  54. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/keenum/_kee_resolve_error.py +2 -2
  55. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/keenum/_kee_type_exception.py +2 -2
  56. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/keenum/_kee_write_once_error.py +11 -9
  57. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/meta/_hook_exception.py +11 -8
  58. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/work_test/__init__.py +10 -1
  59. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/work_test/_base_test.py +21 -27
  60. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/work_test/_sub_test.py +4 -3
  61. worktoy-1.2.0rc0/src/worktoy/work_test/_test_meta.py +115 -0
  62. worktoy-1.2.0rc0/src/worktoy/work_test/_test_space.py +64 -0
  63. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/work_test/samplers/_base_sampler.py +4 -2
  64. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy.egg-info/PKG-INFO +2 -2
  65. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy.egg-info/SOURCES.txt +3 -0
  66. worktoy-1.2.0.dev1/src/worktoy/waitaminute/_work_toy_exception.py +0 -25
  67. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/LICENSE +0 -0
  68. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/setup.cfg +0 -0
  69. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/core/__init__.py +0 -0
  70. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/core/_instance_owner.py +0 -0
  71. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/core/_meta_type.py +0 -0
  72. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/core/control_flow/_control_flow.py +0 -0
  73. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/core/control_flow/_meta_flow.py +0 -0
  74. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/core/control_flow/_skip_set.py +0 -0
  75. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/core/sentinels/__init__.py +0 -0
  76. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/core/sentinels/_args.py +0 -0
  77. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/core/sentinels/_deleted.py +0 -0
  78. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/core/sentinels/_desc.py +0 -0
  79. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/core/sentinels/_meta_call.py +0 -0
  80. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/core/sentinels/_owner.py +0 -0
  81. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/core/sentinels/_sentinel.py +0 -0
  82. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/core/sentinels/_this.py +0 -0
  83. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/desc/_alias.py +0 -0
  84. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/desc/_fast_box.py +0 -0
  85. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/desc/_fix_box.py +0 -0
  86. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/desc/_root_alias.py +0 -0
  87. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/desc/_symbolic_name.py +0 -0
  88. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/dispatch/__init__.py +0 -0
  89. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/dispatch/_call_me_maybe.py +0 -0
  90. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/dispatch/_flex_call.py +0 -0
  91. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/dispatch/_permuter.py +0 -0
  92. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/dispatch/_permuter_method.py +0 -0
  93. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/dispatch/_type_sig.py +0 -0
  94. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/ezdata/__init__.py +0 -0
  95. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/ezdata/_ez_data.py +0 -0
  96. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/ezdata/_ez_store.py +0 -0
  97. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/ezdata/_fields.py +0 -0
  98. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/keenum/__init__.py +0 -0
  99. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/keenum/_access_num.py +0 -0
  100. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/keenum/_kee_box.py +0 -0
  101. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/keenum/_kee_flags.py +0 -0
  102. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/keenum/_kee_flags_hook.py +0 -0
  103. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/keenum/_kee_flags_meta.py +0 -0
  104. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/keenum/_kee_flags_space.py +0 -0
  105. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/keenum/_kee_meta.py +0 -0
  106. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/keenum/_kee_meta_meta.py +0 -0
  107. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/keenum/_kee_num.py +0 -0
  108. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/lorem_ipsum/__init__.py +0 -0
  109. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/lorem_ipsum/_base_generator.py +0 -0
  110. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/lorem_ipsum/_clause.py +0 -0
  111. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/lorem_ipsum/_gaussian_lengths.py +0 -0
  112. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/lorem_ipsum/_paragraph.py +0 -0
  113. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/lorem_ipsum/_sentence.py +0 -0
  114. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/lorem_ipsum/_stochastic_variable.py +0 -0
  115. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/lorem_ipsum/_stochastic_word.py +0 -0
  116. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/lorem_ipsum/_words.py +0 -0
  117. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/mcls/__init__.py +0 -0
  118. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/mcls/_base_meta.py +0 -0
  119. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/mcls/_base_object.py +0 -0
  120. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/mcls/_base_space.py +0 -0
  121. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/mcls/space_hooks/__init__.py +0 -0
  122. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/mcls/space_hooks/_flex_call_hook.py +0 -0
  123. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/mcls/space_hooks/_load_space_hook.py +0 -0
  124. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/mcls/space_hooks/_name_hook.py +0 -0
  125. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/mcls/space_hooks/_reserved_names.py +0 -0
  126. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/mcls/space_hooks/_reserved_namespace_hook.py +0 -0
  127. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/mcls/space_hooks/_space_desc.py +0 -0
  128. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/py.typed +0 -0
  129. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/utilities/__init__.py +0 -0
  130. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/utilities/_args_count.py +0 -0
  131. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/utilities/_class_body_template.py +0 -0
  132. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/utilities/_directory.py +0 -0
  133. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/utilities/_exception_info.py +0 -0
  134. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/utilities/_maybe.py +0 -0
  135. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/utilities/_quick_desc.py +0 -0
  136. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/utilities/_replace_flex.py +0 -0
  137. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/utilities/_slice_len.py +0 -0
  138. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/utilities/_valid_slice.py +0 -0
  139. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/utilities/combinatorics/__init__.py +0 -0
  140. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/utilities/combinatorics/_index_permutations.py +0 -0
  141. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/_alternative_warning.py +0 -0
  142. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/_deprecated_promise.py +0 -0
  143. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/_missing_variable.py +0 -0
  144. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/_subclass_exception.py +0 -0
  145. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/_uncheckable_type.py +0 -0
  146. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/_work_toy_warning.py +0 -0
  147. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/control_flow/__init__.py +0 -0
  148. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/desc/__init__.py +0 -0
  149. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/desc/_access_error.py +0 -0
  150. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/desc/_dangling_alias.py +0 -0
  151. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/desc/_descriptor_exception.py +0 -0
  152. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/desc/_missing_instance_dict.py +0 -0
  153. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/desc/_nameless_callback.py +0 -0
  154. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/desc/_overload_reference.py +0 -0
  155. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/desc/_recursive_read.py +0 -0
  156. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/desc/_reference_conflict.py +0 -0
  157. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/desc/_shared_descriptor.py +0 -0
  158. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/dispatch/__init__.py +0 -0
  159. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/dispatch/_bare_overload.py +0 -0
  160. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/dispatch/_duplicate_signature.py +0 -0
  161. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/dispatch/_unbound_cast_hook.py +0 -0
  162. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/ezdata/__init__.py +0 -0
  163. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/ezdata/_class_field_error.py +0 -0
  164. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/ezdata/_duplicate_error.py +0 -0
  165. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/ezdata/_extra_keyword_exception.py +0 -0
  166. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/ezdata/_extra_positional_exception.py +0 -0
  167. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/ezdata/_incomplete_field_exception.py +0 -0
  168. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/ezdata/_kw_only_exception.py +0 -0
  169. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/ezdata/_repeated_field_exception.py +0 -0
  170. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/ezdata/_reserved_attribute_error.py +0 -0
  171. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/ezdata/_reserved_method_error.py +0 -0
  172. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/keenum/__init__.py +0 -0
  173. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/keenum/_kee_case_exception.py +0 -0
  174. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/keenum/_kee_duplicate.py +0 -0
  175. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/keenum/_kee_flag_duplicate.py +0 -0
  176. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/keenum/_kee_flag_name_error.py +0 -0
  177. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/keenum/_kee_member_name_error.py +0 -0
  178. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/keenum/_kee_name_conflict.py +0 -0
  179. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/meta/__init__.py +0 -0
  180. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/meta/_claimed_name.py +0 -0
  181. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/meta/_control_class_error.py +0 -0
  182. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/meta/_del_exception.py +0 -0
  183. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/meta/_duplicate_hook.py +0 -0
  184. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/meta/_duplicate_sentinel.py +0 -0
  185. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/meta/_illegal_instantiation.py +0 -0
  186. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/meta/_mixed_method_kind.py +0 -0
  187. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/meta/_overload_conflict.py +0 -0
  188. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/meta/_questionable_syntax.py +0 -0
  189. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/meta/_rebound_overload.py +0 -0
  190. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/meta/_reserved_name.py +0 -0
  191. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/meta/_shadowed_class_hook.py +0 -0
  192. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/meta/_slots_refused.py +0 -0
  193. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/waitaminute/meta/_unbound_class_hook.py +0 -0
  194. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/work_test/_complex_mixin.py +0 -0
  195. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/work_test/_complex_test.py +0 -0
  196. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/work_test/samplers/__init__.py +0 -0
  197. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/work_test/samplers/_float_sampler.py +0 -0
  198. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/work_test/samplers/_gaussian_sampler.py +0 -0
  199. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/work_test/samplers/_int_sampler.py +0 -0
  200. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/work_test/samplers/_lorem_sampler.py +0 -0
  201. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/work_test/samplers/_lorem_text.py +0 -0
  202. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/work_test/samplers/_sampler_meta.py +0 -0
  203. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/work_test/samplers/_symbolic_sampler.py +0 -0
  204. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy/work_test/samplers/_word_sampler.py +0 -0
  205. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy.egg-info/dependency_links.txt +0 -0
  206. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/src/worktoy.egg-info/top_level.txt +0 -0
  207. {worktoy-1.2.0.dev1 → worktoy-1.2.0rc0}/tests/test_smoke.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: worktoy
3
- Version: 1.2.0.dev1
3
+ Version: 1.2.0rc0
4
4
  Summary: Declarative structure for Python that enforces types at runtime and enables true function overloading
5
5
  Author-email: Asger Jon Vistisen <asgerjon2@gmail.com>
6
6
  License-Expression: Apache-2.0
@@ -32,7 +32,7 @@ Dynamic: license-file
32
32
  [![PyPI version](https://img.shields.io/pypi/v/worktoy)](https://pypi.org/project/worktoy/)
33
33
  [![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
34
34
 
35
- # worktoy v1.2.0-dev1 (development build)
35
+ # worktoy v1.2.0-rc0 (release candidate)
36
36
 
37
37
  **worktoy** provides utilities for Python development focused on
38
38
  reducing boilerplate while improving type safety and readability. Each
@@ -4,7 +4,7 @@
4
4
  [![PyPI version](https://img.shields.io/pypi/v/worktoy)](https://pypi.org/project/worktoy/)
5
5
  [![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
6
6
 
7
- # worktoy v1.2.0-dev1 (development build)
7
+ # worktoy v1.2.0-rc0 (release candidate)
8
8
 
9
9
  **worktoy** provides utilities for Python development focused on
10
10
  reducing boilerplate while improving type safety and readability. Each
@@ -5,7 +5,7 @@ build-backend = 'setuptools.build_meta'
5
5
 
6
6
  [project]
7
7
  name = "worktoy"
8
- version = "1.2.0-dev1"
8
+ version = "1.2.0-rc0"
9
9
  authors = [
10
10
  { name = "Asger Jon Vistisen", email = "asgerjon2@gmail.com" },
11
11
  ]
@@ -48,7 +48,7 @@ and the enclosing class is left without the decoration.
48
48
  # Copyright (c) 2025-2026 Asger Jon Vistisen
49
49
  from __future__ import annotations
50
50
 
51
- __version__ = '1.2.0-dev1'
51
+ __version__ = '1.2.0-rc0'
52
52
 
53
53
  from . import utilities
54
54
  from . import waitaminute
@@ -103,12 +103,13 @@ class Object(metaclass=MetaType):
103
103
  Implementation
104
104
  --------------
105
105
 
106
- Each 'Object' keeps a stack of '(instance, owner)' frames in
107
- '__call_chain__'. '__get__', '__set__' and '__delete__' push a frame,
108
- call 'hookPreGet', 'hookOnGet', 'hookPreSet', 'hookOnSet',
109
- 'hookPreDelete' or 'hookOnDelete' around '__instance_get__',
110
- '__instance_set__' or '__instance_delete__', and pop the frame in a
111
- 'finally' block. 'self.instance' and 'self.owner' read the top frame.
106
+ Each 'Object' has a stack of '(instance, owner)' frames in each thread,
107
+ of which '__call_chain__' gives a copy. '__get__', '__set__' and
108
+ '__delete__' push a frame, call 'hookPreGet', 'hookOnGet',
109
+ 'hookPreSet', 'hookOnSet', 'hookPreDelete' or 'hookOnDelete' around
110
+ '__instance_get__', '__instance_set__' or '__instance_delete__', and
111
+ pop the frame in a 'finally' block. 'self.instance' and 'self.owner'
112
+ read the top frame.
112
113
  The constructor keeps its arguments, which 'getPosArgs' and
113
114
  'getKeyArgs' return with 'THIS', 'OWNER' and 'DESC' replaced. The
114
115
  defaults of the three '__instance_*__' methods return the descriptor,
@@ -901,7 +902,8 @@ class Object(metaclass=MetaType):
901
902
  def _deletedGuard(self, instance: Any, value: Any, ) -> Any:
902
903
  if value is DELETED:
903
904
  if self.__field_name__ is None:
904
- raise MissingVariable(instance, '__field_name__', str)
905
+ # The descriptor is the one without a name, not the instance.
906
+ raise MissingVariable(self, '__field_name__', str)
905
907
  raise MissingVariable(instance, self.__field_name__, object)
906
908
  return value
907
909
 
@@ -12,8 +12,9 @@ identity, which is why the two families sit side by side in 'core'.
12
12
  one root class.
13
13
  - ControlSpace: the namespace object 'MetaFlow' prepares for a signal.
14
14
  - ControlFlow: the root signal every other signal is based on.
15
- - SkipSet: the one signal the library raises itself, from a
16
- descriptor's 'hookPreSet', telling 'Object.__set__' to skip the write.
15
+ - SkipSet: the one signal the library provides beside the root, for a
16
+ descriptor's 'hookPreSet' to raise, telling 'Object.__set__' to skip
17
+ the write. The library catches it and raises it nowhere itself.
17
18
 
18
19
  The refusal of an attribute in a signal's class body, 'ControlClassError',
19
20
  is an error and lives in 'worktoy.waitaminute.meta' with the other
@@ -34,10 +34,11 @@ class ControlSpace(dict):
34
34
 
35
35
  'MetaFlow.__prepare__' creates the namespace. '__setitem__' admits the
36
36
  names in '__white_list__' ('__str__', '__repr__' and the names the
37
- interpreter writes, such as '__classcell__'), and any name 'Exception'
38
- holds as an attribute that is not callable, such as '__module__',
39
- '__qualname__' and '__doc__'. Every other name raises
40
- 'ControlClassError'. The body of the root signal, declared with
37
+ interpreter writes, such as '__classcell__'), and any dunder name
38
+ 'Exception' holds as an attribute that is not callable, such as
39
+ '__module__', '__qualname__' and '__doc__'. Every other name raises
40
+ 'ControlClassError', 'args' among them, which 'Exception' holds as
41
+ data and which would be state. The body of the root signal, declared with
41
42
  '_root=True', is not checked. 'MetaType' writes '__namespace__' into
42
43
  the class past '__setitem__', as for every class it builds.
43
44
 
@@ -93,4 +94,8 @@ class ControlSpace(dict):
93
94
  else:
94
95
  if callable(existing):
95
96
  raise ControlClassError(self, key)
97
+ if not (key.startswith('__') and key.endswith('__')):
98
+ # This branch is reached by the following:
99
+ # - 'args', the one plain name 'Exception' holds as data
100
+ raise ControlClassError(self, key)
96
101
  return dict.__setitem__(self, key, value)
@@ -1,9 +1,12 @@
1
1
  """
2
2
  The 'worktoy.desc' package provides the base descriptor classes. It
3
3
  introduces the descriptor-context: during an access the active
4
- '(instance, owner)' pair is recorded on the descriptor, so accessor
5
- hooks can read the current instance and owner instead of receiving
6
- them as arguments.
4
+ '(instance, owner)' pair is recorded for the descriptor, in the thread
5
+ making the access, so accessor hooks can read the current instance and
6
+ owner instead of receiving them as arguments. A read that runs no code
7
+ but that of 'AttriBox' makes no record: with no read callback
8
+ registered and none of 'hookPreGet', 'hookOnGet' and '__instance_get__'
9
+ overridden, a value already stored is returned as it is.
7
10
 
8
11
  Accessed through the owning class, a descriptor returns itself.
9
12
  Accessed through an instance, it runs the accessor appropriate for
@@ -98,6 +98,10 @@ class AttriBox(BaseDescriptor[T]):
98
98
 
99
99
  __storage_name__ : str or None
100
100
  The cached key in the instance dictionary.
101
+
102
+ __reads_plainly__ : bool or None
103
+ Whether the read hooks and the fetch are those of 'AttriBox', settled
104
+ at the first read through an instance and 'None' until then.
101
105
  """
102
106
 
103
107
  # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
@@ -107,6 +111,7 @@ class AttriBox(BaseDescriptor[T]):
107
111
  # Private Variables
108
112
  __field_type__: Optional[type] = None
109
113
  __storage_name__: Optional[str] = None # kept by '_getStorageName'
114
+ __reads_plainly__: Optional[bool] = None # kept by '_settleReadsPlainly'
110
115
 
111
116
  # Public Variables
112
117
  fieldType: Field[type] = Field()
@@ -470,10 +475,41 @@ class AttriBox(BaseDescriptor[T]):
470
475
  def __get__(self, instance: Any, owner: type) -> T: ...
471
476
  # @formatter:on
472
477
 
478
+ def _settleReadsPlainly(self, ) -> None:
479
+ """
480
+ The '_settleReadsPlainly' method settles, once for the box, whether a
481
+ read through it runs no code but that of 'AttriBox': 'hookPreGet',
482
+ 'hookOnGet' and '__instance_get__' are looked up on the class of the
483
+ box, and '__reads_plainly__' is True when all three are those of
484
+ 'AttriBox', False when a subclass overrides one.
485
+ """
486
+ cls = type(self)
487
+ plain = True
488
+ for name in ('hookPreGet', 'hookOnGet', '__instance_get__'):
489
+ if getattr(cls, name) is not getattr(AttriBox, name):
490
+ plain = False
491
+ object.__setattr__(self, '__reads_plainly__', plain)
492
+
473
493
  def __get__(self, instance: Any, owner: type) -> Union[Self, T]:
474
494
  """
475
495
  Read through the class, the box must give itself, for inspection or
476
- for registering callbacks; read through an instance, the value.
496
+ for registering callbacks; read through an instance, the value. By
497
+ far the most reads are of a value already stored, through a box with
498
+ no read callback, and such a read runs no code of the builder: it
499
+ has no use for the frame or for the hook phases, which cost many
500
+ times the read itself, and must not pay for them.
501
+
502
+ Implementation
503
+ --------------
504
+
505
+ When no read callback is registered and the hooks and the fetch are
506
+ those of 'AttriBox', the stored value is taken from the instance and
507
+ returned, unless it is 'DELETED'. Every other read is the full read
508
+ of 'Object.__get__': the first read of an instance, which builds the
509
+ value, a deleted value, and a storage name that is no name, each of
510
+ which is refused or handled there as before. The callbacks are
511
+ looked at on every read, since one may be registered after reads
512
+ were made.
477
513
 
478
514
  Raises
479
515
  ------
@@ -482,9 +518,24 @@ class AttriBox(BaseDescriptor[T]):
482
518
  The box has no field type or no name, as a box installed with
483
519
  'setattr' after the class was created.
484
520
  """
485
- if instance is not None:
486
- if self.__field_type__ is None:
487
- raise MissingVariable(self, '__field_type__', type)
521
+ if instance is None:
522
+ return super().__get__(instance, owner)
523
+ if self.__field_type__ is None:
524
+ raise MissingVariable(self, '__field_type__', type)
525
+ if not (self.__pre_get_keys__ or self.__on_get_keys__):
526
+ if self.__reads_plainly__ is None:
527
+ self._settleReadsPlainly()
528
+ if self.__reads_plainly__:
529
+ try:
530
+ value = object.__getattribute__(instance, self.__storage_name__)
531
+ except (AttributeError, TypeError):
532
+ # This branch is reached by the following:
533
+ # - The first read of an instance, which has no value yet
534
+ # - A storage name not yet made, or one that is no 'str'
535
+ pass
536
+ else:
537
+ if value is not DELETED:
538
+ return value
488
539
  return super().__get__(instance, owner)
489
540
 
490
541
  def __copy__(self) -> Self:
@@ -19,9 +19,7 @@ T = TypeVar('T', )
19
19
  F = TypeVar('F', bound=Callable[..., Any])
20
20
 
21
21
  if TYPE_CHECKING: # pragma: no cover, no mutate
22
- from typing import TypeAlias, Self, Union, Optional
23
-
24
- Keys: TypeAlias = tuple[str, ...]
22
+ from typing import Self, Union, Optional
25
23
 
26
24
 
27
25
  class BaseDescriptor(Object, Generic[T]):
@@ -18,17 +18,8 @@ T = TypeVar('T')
18
18
  F = TypeVar('F', bound=Callable[..., Any])
19
19
 
20
20
  if TYPE_CHECKING: # pragma: no cover, no mutate
21
- from typing import TypeAlias, Optional
22
21
  from typing import Self
23
22
 
24
- MaybeStr: TypeAlias = Optional[str]
25
-
26
- StrTuple: TypeAlias = tuple[str, ...]
27
- MaybeStrTuple: TypeAlias = Optional[StrTuple]
28
-
29
- CallMeMaybe: TypeAlias = Callable[..., Any]
30
- MaybeBool: TypeAlias = Optional[bool]
31
-
32
23
 
33
24
  class Field(BaseDescriptor[T]):
34
25
  """
@@ -22,7 +22,6 @@ from . import TypeSig, PermuterMethod, CallMeMaybe
22
22
 
23
23
  if TYPE_CHECKING: # pragma: no cover, no mutate
24
24
  from typing import Any, Callable, Never, TypeAlias, Optional, Self
25
- from . import Dispatcher
26
25
 
27
26
  Method: TypeAlias = Callable[[Any, ...], Any]
28
27
  SigFuncList: TypeAlias = list[tuple[TypeSig, Method]]
@@ -24,7 +24,6 @@ if TYPE_CHECKING: # pragma: no cover, no mutate
24
24
 
25
25
  Method: TypeAlias = Callable[..., Any]
26
26
  Decorator: TypeAlias = Callable[[Method], Any]
27
- Order: TypeAlias = tuple[int, ...]
28
27
 
29
28
 
30
29
  class overload: # NOQA
@@ -8,7 +8,7 @@ from __future__ import annotations
8
8
  from copy import deepcopy, Error
9
9
  from typing import TYPE_CHECKING, TypeVar, Generic
10
10
 
11
- from ..core.sentinels import THIS
11
+ from ..core.sentinels import THIS, SentinelMeta
12
12
  from ..desc import Field
13
13
  from ..dispatch import TypeSig
14
14
  from ..mcls import BaseObject
@@ -419,7 +419,7 @@ class EZField(BaseObject, Generic[T]):
419
419
  A new EZField carrying 'type_' as its field type. The
420
420
  returned instance must subsequently be called to bind
421
421
  construction arguments before it is used as a class-body
422
- field; otherwise 'EZSpace.registerEZField' raises
422
+ field; otherwise 'EZHook._assertCompleteField' raises
423
423
  'IncompleteFieldException' at class-body time.
424
424
 
425
425
  Raises
@@ -443,6 +443,12 @@ class EZField(BaseObject, Generic[T]):
443
443
  if not issubclass(type(type_), type):
444
444
  raise TypeException('fieldType', type_, type)
445
445
  declaration = '%s[%s]' % (cls.__name__, type_.__name__)
446
+ if isinstance(type_, SentinelMeta) and type_ is not THIS:
447
+ infoSpec = """The subscript '%s' names a sentinel as the field
448
+ type. A sentinel stands for a meaning, such as the enclosing class,
449
+ and is no type of value a field could hold; the field type is the
450
+ class of the values the field holds."""
451
+ raise TypeError(textFmt(infoSpec % declaration))
446
452
  TypeSig.validateTypes(type_, variadic=False, declaration=declaration)
447
453
  if type_ is THIS:
448
454
  infoSpec = """The subscript '%s' names 'THIS', the class being
@@ -30,7 +30,6 @@ if TYPE_CHECKING: # pragma: no cover, no mutate
30
30
 
31
31
  INIT: TypeAlias = Callable[..., None]
32
32
  ITER: TypeAlias = Callable[..., Iterator]
33
- BOOL: TypeAlias = Callable[..., bool]
34
33
  SETATTR: TypeAlias = Callable[..., None]
35
34
 
36
35
 
@@ -632,8 +631,8 @@ class EZHook(AbstractSpaceHook):
632
631
  instance '__dict__', where one defining neither yields to it.
633
632
  """
634
633
  valueType = type(value)
635
- hasSet = hasattr(valueType, '__set__')
636
- hasDelete = hasattr(valueType, '__delete__')
634
+ hasSet = EZHook._typeDefines(valueType, '__set__')
635
+ hasDelete = EZHook._typeDefines(valueType, '__delete__')
637
636
  return True if hasSet or hasDelete else False
638
637
 
639
638
  @classmethod
@@ -849,17 +848,23 @@ class EZHook(AbstractSpaceHook):
849
848
  def _assignField(self: Any, key: str, val: Any, type_: type) -> None:
850
849
  object.__setattr__(self, key, castField(key, val, type_))
851
850
 
852
- def _refuseUnknown(self: Any, **kwargs) -> None:
851
+ # The helpers take the keywords of the caller as one argument, and
852
+ # the receiver of '__init__' is not named 'self': a field named as
853
+ # a parameter of these functions, 'self' or 'argCount', must be
854
+ # free to arrive as a keyword, as 'dataclasses' arranges for a field
855
+ # named 'self'.
856
+
857
+ def _refuseUnknown(self: Any, kwargs: dict) -> None:
853
858
  for key in kwargs:
854
859
  if key not in fieldNames:
855
860
  raise ExtraKeywordException(type(self), key, *fieldNames)
856
861
 
857
- def _refuseRepeated(self: Any, argCount: int, **kwargs) -> None:
862
+ def _refuseRepeated(self: Any, argCount: int, kwargs: dict) -> None:
858
863
  for key in fieldNames[:argCount]:
859
864
  if key in kwargs:
860
865
  raise RepeatedFieldException(type(self), key)
861
866
 
862
- def _applyKwargs(self: Any, **kwargs) -> None:
867
+ def _applyKwargs(self: Any, kwargs: dict) -> None:
863
868
  for key, type_, _ in specs:
864
869
  if key in kwargs:
865
870
  _assignField(self, key, kwargs[key], type_)
@@ -876,14 +881,15 @@ class EZHook(AbstractSpaceHook):
876
881
  if key not in values:
877
882
  object.__setattr__(self, key, makeDefault())
878
883
 
879
- def __init__(self: Any, *args, **kwargs) -> None:
884
+ def __init__(__ez_self__: Any, *args, **kwargs) -> None:
885
+ self = __ez_self__
880
886
  if not self.__kw_only__:
881
887
  _applyArgs(self, *args)
882
888
  elif args:
883
889
  raise KwargsOnlyException(type(self), len(args))
884
- _refuseUnknown(self, **kwargs)
885
- _refuseRepeated(self, len(args), **kwargs)
886
- _applyKwargs(self, **kwargs)
890
+ _refuseUnknown(self, kwargs)
891
+ _refuseRepeated(self, len(args), kwargs)
892
+ _applyKwargs(self, kwargs)
887
893
  _applyDefaults(self)
888
894
  try:
889
895
  postInit = type.__getattribute__(type(self), '__post_init__')
@@ -1002,7 +1008,10 @@ class EZHook(AbstractSpaceHook):
1002
1008
  construction.
1003
1009
  """
1004
1010
 
1005
- def replace(self: Any, **changes) -> Any:
1011
+ # The receiver is not named 'self', so a field of that name may be
1012
+ # among the changes.
1013
+ def replace(__ez_self__: Any, **changes) -> Any:
1014
+ self = __ez_self__
1006
1015
  return type(self)(**{**self.asDict(), **changes})
1007
1016
 
1008
1017
  return replace
@@ -5,7 +5,6 @@ EZMeta is the metaclass behind 'EZData'.
5
5
  # Copyright (c) 2026 Asger Jon Vistisen
6
6
  from __future__ import annotations
7
7
 
8
- from collections.abc import Callable
9
8
  from typing import TYPE_CHECKING
10
9
 
11
10
  from ..desc import Field
@@ -18,7 +17,6 @@ if TYPE_CHECKING: # pragma: no cover, no mutate
18
17
 
19
18
  from . import EZMeta
20
19
 
21
- AsTypeSig: TypeAlias = Callable[..., TypeSig]
22
20
  Bases: TypeAlias = tuple[EZMeta, ...]
23
21
 
24
22
 
@@ -32,8 +30,10 @@ class EZMeta(BaseMeta):
32
30
  for structural equality between EZData classes that declare
33
31
  the same field-type signature.
34
32
 
35
- Two classes are 'congruent' when their field-type tuples
36
- compare equal under 'TypeSig.__eq__'. The generated '__eq__'
33
+ Two classes are 'congruent' when one is based on the other and
34
+ their field-type tuples compare equal under 'TypeSig.__eq__'; two
35
+ unrelated classes of the same field types are not. The generated
36
+ '__eq__'
37
37
  on EZData instances uses 'isCongruent' to admit cross-class
38
38
  equality, so a 'FrozenComplex(EZComplex)' instance can
39
39
  compare equal to its non-frozen parent's instances.
@@ -14,10 +14,9 @@ from ..utilities import maybe
14
14
  from ..waitaminute.ezdata import DuplicateError, ReservedFieldError
15
15
 
16
16
  if TYPE_CHECKING: # pragma: no cover, no mutate
17
- from typing import Optional, TypeAlias, Type
17
+ from typing import Optional, TypeAlias
18
18
  from . import EZMeta, EZField
19
19
 
20
- Meta: TypeAlias = Type[EZMeta]
21
20
  Bases: TypeAlias = tuple[EZMeta, ...]
22
21
 
23
22
 
@@ -31,11 +31,12 @@ class KeeFlag:
31
31
  its index.
32
32
 
33
33
  Where the 'Kee' class allows the novel syntactic sugar of 'Kee[int](1)',
34
- 'KeeFlag' requires the owning 'KeeFlags' class to specify the type of the
35
- 'value' of each member. While duplicate 'name' attributes between members
36
- are disallowed, duplicate 'value' attributes are allowed. Please note
37
- however that when retrieving members by value, the member having the
38
- lowest index is used.
34
+ a 'KeeFlag' names neither the type nor the value: its flag is valued by
35
+ its name, and the owning 'KeeFlags' class holds every flag to the type
36
+ of the 'value' of its first flag. While duplicate 'name' attributes
37
+ between members are disallowed, duplicate 'value' attributes are
38
+ allowed. Please note however that when retrieving members by value, the
39
+ member having the lowest index is used.
39
40
 
40
41
  The flags are read for every member as the class is created, so their
41
42
  attributes are builtin properties over the private values, not worktoy
@@ -47,7 +48,8 @@ class KeeFlag:
47
48
  - name: The flag's name, set from the class-body assignment by
48
49
  'KeeFlagsSpace.addKeeFlag'.
49
50
  - index: The flag's bit index, the number of flags declared before
50
- it. Assigned by the metaclass before the 'KeeFlags' class exists.
51
+ it. Assigned by 'KeeFlagsMeta._createFlags' once the 'KeeFlags'
52
+ class exists.
51
53
  - args: Positional arguments passed to the 'KeeFlag()' constructor.
52
54
  - kwargs: Keyword arguments passed to the 'KeeFlag()' constructor.
53
55
  """
@@ -120,9 +122,9 @@ class KeeFlag:
120
122
  """
121
123
  A 'KeeFlag' in a 'KeeFlags' body is claimed by 'KeeFlagsHook' before
122
124
  the namespace stores it, so the interpreter never calls this method
123
- for it; the flag's owner is written by 'KeeFlag.clone' as the class
124
- is assembled. The interpreter reaches this method only for a
125
- 'KeeFlag' in the body of a class not built by 'KeeFlagsMeta', which
125
+ for it; the flag's owner is written by 'KeeFlagsMeta._createFlags'
126
+ once the class exists. The interpreter reaches this method only for
127
+ a 'KeeFlag' in the body of a class not built by 'KeeFlagsMeta', which
126
128
  is refused with a 'TypeError' saying where a 'KeeFlag' belongs.
127
129
  """
128
130
  infoSpec = """A 'KeeFlag' declares a flag of a flags enumeration and
@@ -174,7 +176,8 @@ class KeeFlag:
174
176
  def __hash__(self, ) -> int:
175
177
  return hash((self.__field_owner__, self.__field_name__, self.index))
176
178
 
177
- __index__ = _getIndex
179
+ def __index__(self, ) -> int:
180
+ return self._getIndex()
178
181
 
179
182
  # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
180
183
  # CONSTRUCTORS # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
@@ -1,5 +1,6 @@
1
1
  """
2
- Kee is the descriptor that declares a member of a 'KeeNum' enumeration.
2
+ Kee is the descriptor that declares a member of a 'KeeNum' enumeration or
3
+ a flag of a 'KeeFlags' class.
3
4
  """
4
5
  # Apache-2.0 license
5
6
  # Copyright (c) 2025-2026 Asger Jon Vistisen
@@ -25,7 +26,8 @@ declaration of a member: 'Day[x]' gives the member at position 'x'."""
25
26
 
26
27
  class Kee(AttriBox[T]):
27
28
  """
28
- Kee is the descriptor that declares a member of a KeeNum enumeration.
29
+ Kee is the descriptor that declares a member of a KeeNum enumeration, or
30
+ a flag of a 'KeeFlags' class.
29
31
 
30
32
  Each 'Kee' instance placed in the class body of a KeeNum subclass
31
33
  contributes one member, with the following defining properties:
@@ -48,6 +50,13 @@ class Kee(AttriBox[T]):
48
50
  created by the KeeMeta metaclass, which defines class-level behavior;
49
51
  'Kee' defines how individual members are admitted into the
50
52
  enumeration.
53
+
54
+ Placed in the class body of a 'KeeFlags' subclass instead, as
55
+ 'READ = Kee[str]()', a 'Kee' declares one flag, and the class builds a
56
+ member for every combination of its flags. 'KeeFlagsHook' claims such
57
+ a 'Kee', 'KeeFlagsSpace.addKeeFlag' names it and
58
+ 'KeeFlagsMeta._createFlags' places it on the class; it receives no
59
+ index.
51
60
  """
52
61
 
53
62
  # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
@@ -175,9 +184,12 @@ class Kee(AttriBox[T]):
175
184
  it; 'KeeMeta._createMembers' calls it instead, with the enumeration
176
185
  as owner, once the class exists, and the placement of a box runs: a
177
186
  'Kee' declared without parentheses, or placed on another enumeration
178
- already, is refused there. The interpreter reaches this method only
179
- for a 'Kee' in the body of a class not built by 'KeeMeta', which is
180
- refused with a 'TypeError' saying where a 'Kee' belongs.
187
+ already, is refused there. A 'Kee' in a 'KeeFlags' body is claimed by
188
+ 'KeeFlagsHook' and placed by 'KeeFlagsMeta._createFlags', which calls
189
+ 'AttriBox.__set_name__' and so passes this method by. The interpreter
190
+ reaches this method only for a 'Kee' in the body of a class built by
191
+ neither metaclass, which is refused with a 'TypeError' saying where a
192
+ 'Kee' belongs.
181
193
  """
182
194
  # Local import: 'KeeMeta' loads after this file in the package.
183
195
  from . import KeeMeta
@@ -13,9 +13,8 @@ from ..waitaminute.keenum import KeeNameConflict
13
13
  from . import KeeSpaceHook, Kee
14
14
 
15
15
  if TYPE_CHECKING: # pragma: no cover, no mutate
16
- from typing import Any, Dict, TypeAlias
16
+ from typing import Any, TypeAlias
17
17
 
18
- Members: TypeAlias = Dict[str, Kee]
19
18
  Bases: TypeAlias = tuple[type, ...]
20
19
 
21
20
 
@@ -14,11 +14,7 @@ from ..waitaminute.meta import UnboundClassHook
14
14
  from . import Kee
15
15
 
16
16
  if TYPE_CHECKING: # pragma: no cover, no mutate
17
- from typing import Any, Type, TypeAlias, Callable
18
- from . import KeeMeta
19
-
20
- __INIT__: TypeAlias = Callable[[KeeMeta, Kee], None]
21
- __GET__: TypeAlias = Callable[[KeeMeta, KeeMeta, Type[KeeMeta]], Any]
17
+ from typing import Any
22
18
 
23
19
 
24
20
  class KeeSpaceHook(AbstractSpaceHook):
@@ -58,8 +58,12 @@ class AbstractMetaclass(MetaType, metaclass=MetaType):
58
58
  classes stays identity; '__class_eq__', '__class_ne__' and a
59
59
  class-level '__getitem__' are deliberately not offered, and a
60
60
  subscript of a class goes to its '__class_getitem__' as in plain
61
- Python. The defaults hand over with 'super()', so a metaclass based on
62
- 'MetaType' mixed in beside this one takes part.
61
+ Python. The defaults of '__call__', '__instancecheck__',
62
+ '__subclasscheck__', '__str__', '__repr__', '__setattr__' and
63
+ '__delattr__' hand over with 'super()', so a metaclass based on
64
+ 'MetaType' mixed in beside this one takes part in those. The defaults
65
+ of the other operations answer themselves and reach no metaclass
66
+ listed after this one.
63
67
 
64
68
  Python expects one of two behaviours from an object that iterates: an
65
69
  iterable, whose '__iter__' returns a fresh iterator at every call and
@@ -13,7 +13,7 @@ from ..waitaminute.meta import HookException, DuplicateHook, ClaimedName
13
13
  from .space_hooks import NamespaceHook, ReservedNamespaceHook
14
14
 
15
15
  if TYPE_CHECKING: # pragma: no cover, no mutate
16
- from typing import Any, TypeAlias, Iterator, Union, Self, Optional
16
+ from typing import Any, TypeAlias, Iterator, Self, Optional
17
17
  from .space_hooks import AbstractSpaceHook
18
18
  from . import AbstractMetaclass as AMeta
19
19
 
@@ -21,7 +21,6 @@ if TYPE_CHECKING: # pragma: no cover, no mutate
21
21
  Bases: TypeAlias = tuple[Self, ...]
22
22
  Hooks: TypeAlias = list[AbstractSpaceHook]
23
23
  MROSpace: TypeAlias = dict[str, list[Any]]
24
- TypeName: TypeAlias = Union[str, type]
25
24
 
26
25
 
27
26
  class AbstractNamespace(dict):
@@ -369,7 +368,8 @@ class AbstractNamespace(dict):
369
368
  The body never bound the name.
370
369
 
371
370
  HookException
372
- A hook raised; the original is its cause.
371
+ A hook raised; the original is its context, and is kept at
372
+ 'initialException'.
373
373
  """
374
374
  # The miss is kept apart from the value, which a class body may well
375
375
  # bind to a 'KeyError' of its own.
@@ -11,14 +11,10 @@ from . import SpaceDesc
11
11
  from ...core import Object, MetaType
12
12
 
13
13
  if TYPE_CHECKING: # pragma: no cover, no mutate
14
- from typing import Any, Callable, TypeAlias, Type, Union, Optional
14
+ from typing import Any, TypeAlias, Union, Optional
15
15
  from .. import AbstractMetaclass
16
16
  from .. import AbstractNamespace as ASpace
17
17
 
18
- AccessorHook = Callable[[ASpace, str, Any], Any]
19
- CompileHook = Callable[[ASpace, dict], dict]
20
- Space: TypeAlias = Type[ASpace]
21
- Desc: TypeAlias = Union[ASpace, SpaceDesc]
22
18
  MaybeSpace: TypeAlias = Optional[ASpace]
23
19
  Meta: TypeAlias = Union[MetaType, AbstractMetaclass, type]
24
20
  from .. import AbstractNamespace
@@ -6,14 +6,6 @@ index.
6
6
  # Copyright (c) 2025-2026 Asger Jon Vistisen
7
7
  from __future__ import annotations
8
8
 
9
- from typing import TYPE_CHECKING
10
-
11
- if TYPE_CHECKING: # pragma: no cover, no mutate
12
- from typing import Any, TypeAlias
13
-
14
- SlotInts: TypeAlias = dict[Any, tuple[int, ...]]
15
- SlotMap: TypeAlias = dict[Any, int]
16
-
17
9
  _NO_MATCH = 'No assignment gives every slot a distinct index'
18
10
 
19
11