[New-bugs-announce] [issue25257] In subject line email library inserts unwanted space after a thousands comma in a number

Bob Hossley report at bugs.python.org
Mon Sep 28 20:19:52 CEST 2015


New submission from Bob Hossley:

In my function makeMsg(), there is:

    msg = email.mime.nonmultipart.MIMENonMultipart('text',
        'plain', charset='utf-8')
    msg['Subject'] = email.header.Header(subject, 'utf-8')

subject has no space after the thousands comma:

u'1,010 words - "The Blackmail Caucus, a.k.a. the Republican Party" By Paul Krugman'


But

msg['Subject'].__str__()

'1, 010 words - "The Blackmail Caucus,\n a.k.a. the Republican Party" By Paul Krugman'

has a space after the thousands comma and the email message later generated has a space after the thousands comma.

This is objectionable.

Note that the email library also inserts a newline after the comma that is followed by a space.  Since I see no effect of this newline on the email generated, I have no objection to the newline.

----------
components: email
messages: 251782
nosy: SegundoBob, barry, r.david.murray
priority: normal
severity: normal
status: open
title: In subject line email library inserts unwanted space after a thousands comma in a number
type: behavior
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25257>
_______________________________________


More information about the New-bugs-announce mailing list