Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!bcyclone05.am1.xlned.com!bcyclone05.am1.xlned.com!newsfeed.xs4all.nl!newsfeed1a.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.124 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.78; '*S*': 0.03; 'subject:would': 0.07; 'hmm.': 0.16; 'none.': 0.16; 'trying': 0.19; 'looks': 0.24; 'header:In-Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; 'probably': 0.32; 'figure': 0.32; 'to:name:python-list': 0.33; "i'd": 0.34; 'received:google.com': 0.35; 'subject:?': 0.36; 'to:addr:python-list': 0.38; 'rather': 0.38; 'to:addr:python.org': 0.39; "you're": 0.61; 'subject:you': 0.87; 'directly.': 0.95 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=xvArIWNIoOH5AYJQTNgdhaIzmZkFYG317GQ79I1E+bw=; b=xt0IyPCbE2tNnKqd8/3ax/MmCQ2+wQOzqZUzYLIGnUpO8bkvltVc1hODsoldxWq3Rc klndwAzyapX6DPOCmMjkpBMM1mnrv349aJfewMzHOX22ZQPeEymudzOBJBh/3o5XU83H LsX6ukvXlMvzBr8u3UZtPwgst/gPkOVINgKaKVF3KXAe/g7MGaKdisOA/kvzYL0iF3ox j4CTQ63KMUJEJmR2qG+XuRj4fzPPs/WbjLRVqsZq8/LVdWqnL5Q2OVNp/NUiHbDDdlyQ in4ffAhdpGxn3a/XxseyYMApQRfskM5sMHQWyV9YutDjvfOJO18LHnYzYaoercHCtNCw PJlA== MIME-Version: 1.0 X-Received: by 10.180.37.110 with SMTP id x14mr16324442wij.45.1424411517836; Thu, 19 Feb 2015 21:51:57 -0800 (PST) In-Reply-To: References: Date: Thu, 19 Feb 2015 22:51:57 -0700 Subject: Re: What behavior would you expect? From: Jason Friedman To: python-list Content-Type: multipart/alternative; boundary=e89a8f6475a988e4b8050f7ea60b 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: 41 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1424411525 news.xs4all.nl 2887 [2001:888:2000:d::a6]:55713 X-Complaints-To: abuse@xs4all.nl X-Received-Bytes: 4592 X-Received-Body-CRC: 2115170401 Xref: csiph.com comp.lang.python:85950 --e89a8f6475a988e4b8050f7ea60b Content-Type: text/plain; charset=UTF-8 > > I'd still advise using my_list.sort() rather than sorted(), as you > don't need to retain the original. > > Hmm. Trying to figure out what that looks like. If I understand correctly, list.sort() returns None. What would I return to the caller? > If you're going to call listdir, you probably want to use fnmatch directly. > > Got it. --e89a8f6475a988e4b8050f7ea60b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I'd still advise using my_list.sort() rather than sorted(), as you
don't need to retain the original.


Hmm.

Trying to figure out what that looks like.
= If I understand correctly, list.sort() returns None.
What would I return= to the caller?
=C2=A0
If you're going to call listdir, you probably want to use fnmatch direc= tly.


Got it.
--e89a8f6475a988e4b8050f7ea60b--