[Python-Dev] PEP 393 Summer of Code Project

Stephen J. Turnbull stephen at xemacs.org
Thu Sep 1 11:15:50 CEST 2011


Glenn Linderman writes:

 > How many different iterators into the same text would be concurrently 
 > needed by an application?  And why?

A WYSIWYG editor for structured text (TeX, HTML) might want two (at
least), one for the "source" window and one for the "rendered" window.
One might want to save the state of the iterators (if that's possible)
and cache it as one moves the "window" forward to make short backward
motion fast, giving you two (or four, etc) more.

 > Seems like if it is dealing with text at the level of grapheme
 > clusters, it needs that type of iterator.  Of course, if it does
 > I/O it needs codec access, but that is by nature sequential from
 > the starting point to the end point.

`save-region' ?  `save-text-remove-markup' ?


More information about the Python-Dev mailing list