Hello, On Wed, 04 Jun 2014 19:49:18 +0300 Serhiy Storchaka <[email protected]> wrote:
[] > > But show me real-world case for that. Common usecase is scanning > > string left-to-right, that should be done using iterator and thus > > O(N). Right-to-left scanning would be order(s) of magnitude less > > frequent, as and also handled by iterator. > > html.HTMLParser, json.JSONDecoder, re.compile, tokenize.tokenize > don't use iterators. They use indices, str.find and/or regular > expressions. Common use case is quickly find substring starting from > current position using str.find or re.search, process found token, > advance position and repeat. That's sad, I agree. -- Best regards, Paul mailto:[email protected] _______________________________________________ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
