Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.85.MISMATCH!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!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.018 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'instance,': 0.05; 'system?': 0.07; 'there?': 0.09; 'unix,': 0.09; 'am,': 0.14; 'wrote:': 0.14; 'angelico': 0.16; 'arbitrarily': 0.16; 'emacs': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'recursive': 0.16; 'possibly': 0.16; 'mon,': 0.17; 'header:In- Reply-To:1': 0.21; 'received:209.85.210.174': 0.23; 'received :mail-iy0-f174.google.com': 0.23; 'not.': 0.26; 'message- id:@mail.gmail.com': 0.28; 'lee': 0.29; 'jonathan': 0.29; 'like,': 0.29; 'bit': 0.30; 'least': 0.30; 'implement': 0.30; 'yes.': 0.30; 'it.': 0.31; 'done': 0.32; 'to:addr:python-list': 0.33; 'it?': 0.33; 'chris': 0.34; 'file': 0.34; 'sense,': 0.35; 'difference': 0.37; 'takes': 0.37; 'received:google.com': 0.37; 'received:209.85': 0.37; 'could': 0.38; 'but': 0.38; 'subject:: ': 0.38; 'user': 0.39; 'received:209': 0.39; 'to:addr:python.org': 0.39; 'under': 0.40; 'possibility': 0.40; 'delete': 0.40; 'your': 0.60; 'yourself': 0.68; 'offer': 0.71; 'wipe': 0.84; 'contents,': 0.91; 'subject:English': 0.91; 'acknowledge': 0.96 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=8EKjKStUAOtD5khF79viyp6SIF0+kNGo1NuoWXecZ88=; b=cxX7MoOtYF1pc4dP/LZAeYn09q1b0eTGg1p+Ye6y/zm9cpE8mPsFoOrhhB5B1rUpYm V35W3yFOx2PK3rOmpMMNbJgScRv1xF6JAHSq4V0JgVHEz5esf9Fml1sS3GPuyNxFPSyA eKWRe5oAFdWQM/ldH0vu3ivcrma3rhpJocM4s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=sQXe1P6aIMSDL7ToNZuPYYDcCqVpzowvH7FL2bI2qP9pEHQJdIPx7T6cbsUK0fPw79 unuFZitAmZStwtOvnWE6XqnDFaTysLXgKAycU8KONemZHECuC+Cc/kLKvbddjCzSh7lW N5hqAiNqt5X30GQ7RyWEFlT+X5NbhfHPc1Bgw= MIME-Version: 1.0 In-Reply-To: <9e1166f5-d239-4343-a0fc-7703e80b722b@r35g2000prj.googlegroups.com> References: <9e1166f5-d239-4343-a0fc-7703e80b722b@r35g2000prj.googlegroups.com> Date: Mon, 23 May 2011 08:46:26 +1000 Subject: Re: English Idiom in Unix: Directory Recursively From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 29 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1306104389 news.xs4all.nl 49174 [::ffff:82.94.164.166]:59389 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:6016 On Mon, May 23, 2011 at 6:22 AM, Xah Lee wrote: > Xah wrote: > =ABIn the emacs case: =93Recursive delete of xx? (y or n) =94, what could= it > possibly mean by the word =93recursive=94 there? Like, it might delete th= e > directory but not delete all files in it? > =BB > > Jonathan de Boyne Pollard wrote: >> It might *try* to delete the directory but not any of its contents, >> yes. > > you mean theoretically you see a possibility if the dir is implement > as stilted as unix, but never in your life you find yourself might > want to do it? There's a difference between working with a directory itself and working with files inside it. Generally, if you copy or delete a directory, you will want to recurse. But if you want to, for instance, wipe out all files whose names end with a tilde, then you might want to recurse and you might not. So it makes sense to offer the user a choice, and if recursive action is the only one that makes sense, at least acknowledge that the operation might take an arbitrarily long time. (Ever done a recursive operation on / on a large file system? Takes just a little bit longer than a non-recursive one under the same circumstances...) Chris Angelico