A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2000-May/003951.html below:

[Python-Dev] [I18n-sig] Unicode strings: an alternative

[Python-Dev] [I18n-sig] Unicode strings: an alternative [Python-Dev] [I18n-sig] Unicode strings: an alternativeSkip Montanaro skip@mojam.com (Skip Montanaro)
Wed, 3 May 2000 15:51:49 -0500 (CDT)
    Tom> Is it possible to add a logical length field too? I presume it is
    Tom> too expensive to recalculate the logical (character) length of a
    Tom> string each time len(s) is called? Doing this is only slightly more
    Tom> time consuming than a normal strlen: ...

Note that currently the len() method doesn't call strlen() at all.  It just
returns the ob_size field.  Presumably, with Just's proposal len() would
simply return ob_size/width.  If you used a variable width encoding, Just's
plan wouldn't work.  (I don't know anything about string encodings - is
UTF-8 variable width?)




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4