~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/utextwrap.py

  • Committer: INADA Naoki
  • Date: 2011-05-14 00:25:03 UTC
  • mto: This revision was merged to the branch mainline in revision 5874.
  • Revision ID: songofacandy@gmail.com-20110514002503-okwdkfxp9gwo8prd
Remove asserts

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
        When s is unicode, take care of east asian width.
92
92
        When s is bytes, treat all byte is single width character.
93
93
        """
94
 
        assert isinstance(s, unicode)
95
94
        charwidth = self._unicode_char_width
96
95
        return sum(charwidth(c) for c in s)
97
96
 
100
99
 
101
100
        Head is large as long as _width(head) <= width.
102
101
        """
103
 
        assert isinstance(s, unicode)
104
102
        w = 0
105
103
        charwidth = self._unicode_char_width
106
104
        for pos, c in enumerate(s):