This constructor is used internally after parsing the header. Instances should generally be created from a factory function, such as parse_filename and its variants.
(self, disposition='inline', assocs=None, location=None)
| 68 | """ |
| 69 | |
| 70 | def __init__(self, disposition='inline', assocs=None, location=None): |
| 71 | """This constructor is used internally after parsing the header. |
| 72 | |
| 73 | Instances should generally be created from a factory |
| 74 | function, such as parse_filename and its variants. |
| 75 | """ |
| 76 | |
| 77 | self.disposition = disposition |
| 78 | self.location = location |
| 79 | if assocs is None: |
| 80 | self.assocs = {} |
| 81 | else: |
| 82 | # XXX Check that parameters aren't repeated |
| 83 | self.assocs = dict((key.lower(), val) for (key, val) in assocs) |
| 84 | |
| 85 | @property |
| 86 | def filename_unsafe(self): |
nothing calls this directly
no outgoing calls
no test coverage detected