Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.albasani.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed3.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.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'mrab': 0.05; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:Why': 0.09; 'def': 0.12; 'be:': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:run': 0.16; 'subject:under': 0.16; 'subject:when': 0.16; 'thanks,': 0.17; 'wrote:': 0.18; 'variable': 0.18; 'code,': 0.22; 'header:User- Agent:1': 0.23; 'right.': 0.26; 'suggested': 0.26; 'least': 0.26; 'header:X-Complaints-To:1': 0.27; 'assumes': 0.31; 'relies': 0.31; 'there': 0.35; 'charset:us-ascii': 0.36; 'subject:?': 0.36; 'should': 0.36; 'changing': 0.37; 'list': 0.37; 'list.': 0.37; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'called': 0.40; 'dave': 0.60; 'numbers': 0.61; "you're": 0.61; 'taking': 0.65; 'subject:have': 0.80; 'angel': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dave Angel Subject: Re: Why does it have red squiggly lines under it if it works perfectly fine and no errors happen when I run it? Date: Sat, 21 Sep 2013 18:09:24 +0000 (UTC) References: <22b99b0a-598f-4500-9de9-5041c2ce2c8f@googlegroups.com> <24104d3b-ad83-4c15-bb9e-77b61a0bac78@googlegroups.com> <5398c4af-1692-4b7f-9f39-ea392d24199b@googlegroups.com> <523DC6D8.1080301@mrabarnett.plus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: 174.32.174.35 User-Agent: XPN/1.2.6 (Street Spirit ; Linux) 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: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1379786985 news.xs4all.nl 15965 [2001:888:2000:d::a6]:57532 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:54561 On 21/9/2013 12:18, MRAB wrote: > On 21/09/2013 13:53, Dave Angel wrote: > [snip] >> Taking Steven's suggested code, and changing it so it uses a COPY of the >> global list; >> >> def median(): >> # Relies on the global variable called List. >> # assumes there is at least one number in that list >> numbers = List.sorted() > > That should be: > > numbers = sorted(List) OOPS. Thanks, you're so right. -- DaveA