[Python-Dev] UCS2/UCS4 default (original) (raw)
Antoine Pitrou solipsis at pitrou.net
Thu Jul 3 13:58:17 CEST 2008
- Previous message: [Python-Dev] UCS2/UCS4 default
- Next message: [Python-Dev] UCS2/UCS4 default
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
- Previous message: [Python-Dev] UCS2/UCS4 default
- Next message: [Python-Dev] UCS2/UCS4 default
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]