Forest Bond <for...@alittletooquiet.net> added the comment:

Hm, there is one issue.  The example in the docstring wouldn't work.

You have to get the headers *after* the body, because the boundary isn't 
generated until the body has been.  So this would work:

  body = msg.get_body()
  headers = dict(msg)

But this won't:

  headers = dict(msg)
  body = msg.get_body()

I'm not sure what the best way to deal with this is.  Maybe instead of get_body 
we should have get_request_data which returns both headers and body.  That 
would provide simpler semantics.

Thoughts?

Thanks,
Forest

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue3244>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to