Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Gregory Ewing Newsgroups: comp.lang.python Subject: Re: Why did Quora choose Python for its development? Date: Fri, 27 May 2011 15:48:36 +1200 Lines: 17 Message-ID: <948l8nF33pU1@mid.individual.net> References: <80d59383-36a3-4744-85c4-1a0577f1d3a6@dr5g2000vbb.googlegroups.com> <9CDC4B2CD1F445E994119A50F65155DF@teddy> <12225671E9654FECB49613D915FAEC19@teddy> <21A740B7AC6644248476DFADDF726C73@octavian> <629DAC3611EA49B0A36BCF70151CDE2F@octavian> <87sjs44qyk.fsf@castleamber.com> <87zkmcujl4.fsf@castleamber.com> <87sjs4t12l.fsf@castleamber.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net r0iX7pYFCSkTW+EtD+2J7gFQBapewkfwYhyThEkvJzezSFPKm3 Cancel-Lock: sha1:Q+TJDLfrQYk1GMFG9jBybFf95SM= User-Agent: Mozilla Thunderbird 1.0.5 (Macintosh/20050711) X-Accept-Language: en-us, en In-Reply-To: <87sjs4t12l.fsf@castleamber.com> Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:6367 John Bokma wrote: > A Perl programmer will call this line noise: > > double_word_re = re.compile(r"\b(?P\w+)\s+(?P=word)(?!\w)", > re.IGNORECASE) > for match in double_word_re.finditer(text): > print ("{0} is duplicated".format(match.group("word")) Actually, Python programmers would tend to call the RE part of that line noise, too. It's for that reason that we tend to avoid using REs when possible, reaching for them only as a tool of last resort. -- Greg