Path: csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'nested': 0.07; 'string': 0.09; 'append': 0.09; 'mess': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:string': 0.09; 'wrote': 0.14; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'replacing': 0.19; 'code,': 0.22; 'header:X-Complaints-To:1': 0.27; 'function': 0.29; 'character': 0.29; 'up.': 0.33; 'could': 0.34; 'subject:lists': 0.35; 'but': 0.35; 'really': 0.36; 'yield': 0.36; "didn't": 0.36; 'to:addr:python-list': 0.38; 'fact': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'study': 0.69 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dave Angel Subject: Re: generate De Bruijn sequence memory and string vs lists Date: Thu, 23 Jan 2014 20:08:16 -0500 (EST) Organization: news.gmane.org References: X-Gmane-NNTP-Posting-Host: dpc6744192108.direcpc.com X-Newsreader: PiaoHong Usenet NewsReaders 1.36 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1390525561 news.xs4all.nl 2831 [2001:888:2000:d::a6]:41323 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:64649 Vincent Davis Wrote in message: > I didn't really study the code, and the fact that there's a nested function could mess it up. But if it were a straightforward function with exactly one append, , then replacing the append with a yield would produce the string one character at a time. -- DaveA