homepage

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 ignas
Recipients ignas
Date 2008年07月25日.15:58:21
SpamBayes Score 0.009165816
Marked as misclassified No
Message-id <1217001563.39.0.568934696199.issue3446@psf.upfronthosting.co.za>
In-reply-to
Content
Not all combinations of unicode/non-unicode parameters work for ljust,
center and rjust. Passing a unicode character to them as a parameter
when the string is ascii fails with an error.
This doctest fails in 3 places. Though I would expect it to be passing.
def doctest_strings():
 """
 >>> uni = u"a"
 >>> ascii = "a"
 >>> uni.center(5, ascii)
 u'aaaaa'
 >>> uni.center(5, uni)
 u'aaaaa'
 >>> ascii.center(5, ascii)
 'aaaaa'
 >>> ascii.center(5, uni)
 u'aaaaa'
 >>> uni.ljust(5, ascii)
 u'aaaaa'
 >>> uni.ljust(5, uni)
 u'aaaaa'
 >>> ascii.ljust(5, ascii)
 'aaaaa'
 >>> ascii.ljust(5, uni)
 u'aaaaa'
 >>> uni.rjust(5, ascii)
 u'aaaaa'
 >>> uni.rjust(5, uni)
 u'aaaaa'
 >>> ascii.rjust(5, ascii)
 'aaaaa'
 >>> ascii.rjust(5, uni)
 u'aaaaa'
 """
History
Date User Action Args
2008年07月25日 15:59:23ignassetspambayes_score: 0.00916582 -> 0.009165816
recipients: + ignas
2008年07月25日 15:59:23ignassetspambayes_score: 0.00916582 -> 0.00916582
messageid: <1217001563.39.0.568934696199.issue3446@psf.upfronthosting.co.za>
2008年07月25日 15:58:22ignaslinkissue3446 messages
2008年07月25日 15:58:22ignascreate

AltStyle によって変換されたページ (->オリジナル) /