Re: [Python-Dev] headers api for email package

2009-05-01 Thread Chris Withers
Where you just want "a damned valid email and stop making my life hard!": Message['Subject']='Some text' Yes. In which case I propose we guess the encoding as 1) ascii, 2) utf-8, 3) wtf? Well, we're talking about Python 3 here right? In which case the above involves only unicode, so why d

Re: [Python-Dev] headers api for email package

2009-04-13 Thread R. David Murray
On Mon, 13 Apr 2009 at 10:28, Barry Warsaw wrote: On Apr 11, 2009, at 8:39 AM, Chris Withers wrote: Barry Warsaw wrote: > > > > message['Subject'] > The raw bytes or the decoded unicode? A header object. Yep. You got there before I did. :) +1 > Okay, so you've picked one. Now how do y

Re: [Python-Dev] headers api for email package

2009-04-13 Thread Barry Warsaw
On Apr 11, 2009, at 8:39 AM, Chris Withers wrote: Barry Warsaw wrote: >>> message['Subject'] The raw bytes or the decoded unicode? A header object. Yep. You got there before I did. :) Okay, so you've picked one. Now how do you spell the other way? str(message['Subject']) Yes for uns

Re: [Python-Dev] headers api for email package

2009-04-11 Thread Chris Withers
Barry Warsaw wrote: >>> message['Subject'] The raw bytes or the decoded unicode? A header object. Okay, so you've picked one. Now how do you spell the other way? str(message['Subject']) bytes(message['Subject']) Now, setting headers. Sometimes you have some unicode thing and sometimes