MCPcopy Index your code
hub / github.com/python/cpython / register_defect

Method register_defect

Lib/email/_policybase.py:205–216  ·  view source on GitHub ↗

Record 'defect' on 'obj'. Called by handle_defect if raise_on_defect is False. This method is part of the Policy API so that Policy subclasses can implement custom defect handling. The default implementation calls the append method of the defects attribute of obj.

(self, obj, defect)

Source from the content-addressed store, hash-verified

203 self.register_defect(obj, defect)
204
205 def register_defect(self, obj, defect):
206 """Record 'defect' on 'obj'.
207
208 Called by handle_defect if raise_on_defect is False. This method is
209 part of the Policy API so that Policy subclasses can implement custom
210 defect handling. The default implementation calls the append method of
211 the defects attribute of obj. The objects used by the email package by
212 default that get passed to this method will always have a defects
213 attribute with an append method.
214
215 """
216 obj.defects.append(defect)
217
218 def header_max_count(self, name):
219 """Return the maximum allowed number of headers named 'name'.

Callers 1

handle_defectMethod · 0.95

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected