Author ignas
Recipients ignas
Date 2008-07-25.15:58:21
SpamBayes Score 0.00916582
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.00916582
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