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/2008-July/080909.html below:

[Python-Dev] UCS2/UCS4 default

[Python-Dev] UCS2/UCS4 default [Python-Dev] UCS2/UCS4 defaultAntoine Pitrou solipsis at pitrou.net
Thu Jul 3 13:58:17 CEST 2008
Hi,

> Subsequently doing a: print a[1] to get the 0x942a (鐪) actually requires
> a[2] on the 2-byte Python 3.0.

How is it annoying *in practice*? In actual code the index, instead of
being a constant, will be retrieved through various means such as .find()
or re.search().start()... as you show yourself later in your message.

What is primordial is that Python shows a consistent behaviour, and it
does, since indices returned by .find() et al. have the same meaning as
indices you can use with the [] operator. AFAIK that's why Guido asked
for real-world rather than theoretical examples.

Regards

Antoine.


More information about the Python-Dev mailing list

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