]> granicus.if.org Git - python/commit
To better support default content types, fix an API wart, and preserve
authorBarry Warsaw <barry@python.org>
Fri, 19 Jul 2002 22:24:55 +0000 (22:24 +0000)
committerBarry Warsaw <barry@python.org>
Fri, 19 Jul 2002 22:24:55 +0000 (22:24 +0000)
commitc10686426edd6883b88950a754335b678750bf67
tree70739ad0c77c79f1233a7e4226227a1559246a24
parentd43857455e0f1b33a5b5abfe384c7738f10a63f1
To better support default content types, fix an API wart, and preserve
backwards compatibility, we're silently deprecating get_type(),
get_subtype() and get_main_type().  We may eventually noisily
deprecate these.  For now, we'll just fix a bug in the splitting of
the main and subtypes.

get_content_type(), get_content_maintype(), get_content_subtype(): New
methods which replace the above.  These /always/ return a content type
string and do not take a failobj, because an email message always at
least has a default content type.

set_default_type(): Someday there may be additional default content
types, so don't hard code an assertion about the value of the ctype
argument.
Lib/email/Message.py