@@ -435,7 +435,7 @@ class CachedMapper(Mapper[ResultT, FunctionResultT, P]):
435435 """
436436 def __init__ (
437437 self ,
438- err_on_collision : bool = False ,
438+ err_on_collision : bool = __debug__ ,
439439 _cache :
440440 CachedMapperCache [ArrayOrNames , ResultT , P ] | None = None ,
441441 _function_cache :
@@ -661,8 +661,8 @@ class TransformMapper(CachedMapper[ArrayOrNames, FunctionDefinition, []]):
661661 """
662662 def __init__ (
663663 self ,
664- err_on_collision : bool = False ,
665- err_on_created_duplicate : bool = False ,
664+ err_on_collision : bool = __debug__ ,
665+ err_on_created_duplicate : bool = __debug__ ,
666666 _cache : TransformMapperCache [ArrayOrNames , []] | None = None ,
667667 _function_cache : TransformMapperCache [FunctionDefinition , []] | None = None
668668 ) -> None :
@@ -756,8 +756,8 @@ class TransformMapperWithExtraArgs(
756756 """
757757 def __init__ (
758758 self ,
759- err_on_collision : bool = False ,
760- err_on_created_duplicate : bool = False ,
759+ err_on_collision : bool = __debug__ ,
760+ err_on_created_duplicate : bool = __debug__ ,
761761 _cache : TransformMapperCache [ArrayOrNames , P ] | None = None ,
762762 _function_cache :
763763 TransformMapperCache [FunctionDefinition , P ] | None = None
@@ -1930,8 +1930,8 @@ def __init__(
19301930 self ,
19311931 nsuccessors : Mapping [Array , int ],
19321932 _cache : MPMSMaterializerCache | None = None ):
1933- err_on_collision = False
1934- err_on_created_duplicate = False
1933+ err_on_collision = __debug__
1934+ err_on_created_duplicate = __debug__
19351935
19361936 if _cache is None :
19371937 _cache = MPMSMaterializerCache (
0 commit comments