Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #72616 > unrolled thread
| Started by | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| First post | 2014-06-04 09:22 +0100 |
| Last post | 2014-06-04 09:22 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Unicode and Python - how often do you index strings? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-06-04 09:22 +0100
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2014-06-04 09:22 +0100 |
| Subject | Re: Unicode and Python - how often do you index strings? |
| Message-ID | <mailman.10689.1401870148.18130.python-list@python.org> |
On 04/06/2014 01:39, Chris Angelico wrote:
> A current discussion regarding Python's Unicode support centres (or
> centers, depending on how close you are to the cent[er]{2} of the
> universe) around one critical question: Is string indexing common?
>
> Python strings can be indexed with integers to produce characters
> (strings of length 1). They can also be iterated over from beginning
> to end. Lots of operations can be built on either one of those two
> primitives; the question is, how much can NOT be implemented
> efficiently over iteration, and MUST use indexing? Theories are great,
> but solid use-cases are better - ideally, examples from actual
> production code (actual code optional).
>
> I know the collective experience of python-list can't fail to bring up
> a few solid examples here :)
>
> Thanks in advance, all!!
>
> ChrisA
>
Single characters quite often, iteration rarely if ever, slicing all the
time, but does that last one count?
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com
Back to top | Article view | comp.lang.python
csiph-web