4747#: Arguments-presence patterns for :class:`_Modifier` constructor.
4848#: Combinations missing raise errors.
4949_modifier_cstor_matrix = {
50+ # TODO: Add `implicit` in the table, to augment REPR & forbid implicit sfxed.
5051# (7, kw, opt, accessors, sfxed, sfx): (STR, REPR, FUNC) OR None
5152700000 : None ,
5253710000 : ( "%(dep)s" , "'%(dep)s'(%(acs)s>%(kw)s)" , "keyword" ),
@@ -248,7 +249,14 @@ def __new__(
248249 accessor .validate ()
249250 if sideffected and is_sfx (sideffected ):
250251 raise ValueError (
251- f"`sideffected` cannot be sideffect, got { sideffected !r} "
252+ f"`sideffected` cannot be `sfx`, got { sideffected !r} "
253+ f"\n locals={ locals ()} "
254+ )
255+
256+ # TODO: Add `implicit` in the table, to augment REPR & forbid implicit sfxed.
257+ if sideffected and kw .get ("_implicit" ):
258+ raise ValueError (
259+ f"`sideffected` cannot be `implicit`, got { sideffected !r} "
252260 f"\n locals={ locals ()} "
253261 )
254262 double_sideffects = [
@@ -1080,14 +1088,13 @@ def sfxed(
10801088 optional : bool = None ,
10811089 accessor : Accessor = None ,
10821090 jsonp = None ,
1083- implicit = None ,
10841091) -> _Modifier :
10851092 r"""
10861093 Annotates a :term:`sideffected` dependency in the solution sustaining side-effects.
10871094
10881095 :param dependency:
10891096 the actual dependency receiving the sideffect, which will be fed into/out
1090- of the function (unless marked as :term:`implicit`) .
1097+ of the function.
10911098 :param sfx0:
10921099 the 1st (arbitrary object) sideffect marked as "acting" on the `dependency`.
10931100 :param sfx0:
@@ -1103,8 +1110,6 @@ def sfxed(
11031110 :param jsonp:
11041111 None (derrived from `name`), ``False``, str, collection of str/callable (last one)
11051112 See generic :func:`.modify` modifier.
1106- :param implicit:
1107- :term:`implicit` dependencies are not fed into/out of the function.
11081113
11091114 Like :func:`.sfx` but annotating a *real* :term:`dependency` in the solution,
11101115 allowing that dependency to be present both in :term:`needs` and :term:`provides`
@@ -1195,7 +1200,6 @@ def sfxed(
11951200 sfx_list = (sfx0 , * sfx_list ),
11961201 accessor = accessor ,
11971202 jsonp = jsonp ,
1198- implicit = implicit ,
11991203 )
12001204
12011205
0 commit comments