This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author loewis
Recipients benjamin.peterson, eric.smith, loewis, vstinner
Date 2008-09-29.21:33:09
SpamBayes Score 2.3532923e-06
Marked as misclassified No
Message-id <48E14993.1060404@v.loewis.de>
In-reply-to <1222685798.89.0.724902572426.issue3982@psf.upfronthosting.co.za>
Content
>> I think Martin's suggesting of encoding back to ascii might be 
>> the best thing to do
> 
> As I understand, you would like to use bytes as characters, like 
> b'{code} {message}'.format(code=100, message='OK'). So why no using 
> explicit conversion to ASCII? ftp='{code} {message}'.format(code=100, 
> message='OK').encode('ASCII').

That's indeed exactly what I had proposed - only that you shouldn't
repeat the .encode('ascii') all over the place, but instead wrap that
into a function (which I proposed to call push_string, along with the
existing .push function.
History
Date User Action Args
2008-09-29 21:33:09loewissetrecipients: + loewis, vstinner, eric.smith, benjamin.peterson
2008-09-29 21:33:09loewislinkissue3982 messages
2008-09-29 21:33:09loewiscreate