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

Method is_attachment

Lib/email/message.py:1017–1019  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1015 return self.as_string(policy=self.policy.clone(utf8=True))
1016
1017 def is_attachment(self):
1018 c_d = self.get('content-disposition')
1019 return False if c_d is None else c_d.content_disposition == 'attachment'
1020
1021 def _find_body(self, part, preferencelist):
1022 if part.is_attachment():

Callers 3

_find_bodyMethod · 0.80
iter_attachmentsMethod · 0.80
test_is_attachmentMethod · 0.80

Calls 1

getMethod · 0.45

Tested by 1

test_is_attachmentMethod · 0.64