Path: csiph.com!usenet.pasdenom.info!news.etla.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2a.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.020 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'subject:error': 0.03; 'argument': 0.05; 'builtin': 0.09; 'function,': 0.09; '24,': 0.16; 'callable.': 0.16; 'complaining': 0.16; 'did.': 0.16; 'fix': 0.17; 'wrote:': 0.18; 'code.': 0.18; 'error': 0.23; 'fine': 0.24; 'purposes': 0.26; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; 'work.': 0.31; 'code': 0.31; 'posting': 0.31; 'fri,': 0.33; 'could': 0.34; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'object,': 0.36; 'list': 0.37; 'expected': 0.38; 'to:addr:python- list': 0.38; 'list,': 0.38; 'explain': 0.39; 'to:addr:python.org': 0.39; "you're": 0.61; 'name': 0.63; 'here': 0.66; 'returns.': 0.84; 'start.': 0.84; 'subject:Lists': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=YobDXz8iEx8hkZrwGIHJ8kWbW/gpK+upJHOpTt22Dsk=; b=pFy+nYUOrs5yQAbqtCM3lQrKas29FRE5Yrko/FKCPp8Ffkf3oQINCRQIbgAdFEgfDL aV0vGG159fudAtlX+6U1l77FUCzv50nlDWtH1kvsJrkIhjRgQiKAaLQOlol4wKLwv8Pt BTXwrplch2iSC1MQvCW7mX/Lcdo+iLrrW9RoPxk2wtff1LvByzo7gz276PVHe1aEyd6m qcQWSzt4kJOAcMZiZVNJSfJU7IU0I1d5vTcboDGgS09wxnRn924grdd1M2vxByoXTs8V cWnuKRlr+PuemFXBl+ghQYBkaml4tl9+JJcryW1t7Oy3uinA/IDrBtVR1OHbkglgiFPn lkBw== X-Received: by 10.68.175.196 with SMTP id cc4mr3766892pbc.147.1414170382888; Fri, 24 Oct 2014 10:06:22 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <2412654f-ac5e-4678-8956-afc4e27affb3@googlegroups.com> <3082ee74-3182-4ea5-9851-2b1326e5b34c@googlegroups.com> From: Ian Kelly Date: Fri, 24 Oct 2014 11:05:41 -0600 Subject: Re: I am out of trial and error again Lists To: Python Content-Type: text/plain; charset=UTF-8 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: 23 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1414170391 news.xs4all.nl 2965 [2001:888:2000:d::a6]:59450 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:79584 On Fri, Oct 24, 2014 at 10:37 AM, Seymore4Head wrote: > If I could explain to you why something doesn't work then I could fix > it myself. I don't understand why it doesn't work. The best I can do > is repost the code. You don't need to be able to explain why it doesn't work. You just need to be able to explain what you expected it to do and what it actually did. Posting the code and the traceback that you get is a fine start. > if y in lst(range(1,10)): The name of the builtin is "list". It's a function* that takes an argument and uses it to construct a list, which it returns. "lst" is the name of some specific list that you're using in your code. It's not a function, which is why the error is complaining that it isn't callable. *Actually it's a type object, and calling it causes an instance of the type to be constructed, but for all intents and purposes here it works exactly like a function.