Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:" ': 0.03; 'distinct': 0.05; 'operator': 0.05; 'constructor': 0.07; 'hettinger': 0.07; 'int,': 0.07; 'received:verizon.net': 0.07; 'terry': 0.07; 'python': 0.08; 'arguments.': 0.09; 'builtin': 0.09; 'called.': 0.09; 'categories.': 0.09; 'range,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'tracker': 0.09; 'output': 0.11; 'am,': 0.13; 'wrote:': 0.15; 'library': 0.15; 'accordingly,': 0.16; 'bug)': 0.16; 'called,': 0.16; 'cleanly': 0.16; 'instances.': 0.16; 'reedy': 0.16; 'subject:() ': 0.16; 'argument': 0.16; 'classes,': 0.16; 'pm,': 0.16; 'subject:list': 0.16; 'subject:skip:d 10': 0.17; 'programming': 0.18; 'functions,': 0.19; 'int': 0.19; 'source.': 0.19; 'raymond': 0.19; 'jan': 0.19; 'input': 0.21; 'subject:not': 0.21; "aren't": 0.22; 'described': 0.22; 'header:In-Reply-To:1': 0.22; 'besides': 0.25; 'string': 0.26; '(and': 0.27; 'objects': 0.28; 'depends': 0.28; 'fact': 0.30; 'classes': 0.30; 'definition': 0.30; 'classified': 0.30; 'modules,': 0.30; 'objects.': 0.30; 'types.': 0.30; 'class': 0.31; 'separate': 0.31; 'named': 0.32; 'tend': 0.32; 'list': 0.32; 'does': 0.32; 'reference': 0.33; 'to:addr :python-list': 0.34; 'header:X-Complaints-To:1': 0.34; 'header :User-Agent:1': 0.34; 'there': 0.34; 'quite': 0.34; 'things': 0.34; 'agree': 0.35; 'that,': 0.35; 'function.': 0.35; 'level.': 0.35; 'issue': 0.37; 'mathematical': 0.37; 'anything': 0.37; 'some': 0.37; 'listed': 0.37; 'doing': 0.37; 'but': 0.37; 'using': 0.37; 'received:org': 0.38; 'not,': 0.38; 'subject:: ': 0.38; 'header:Mime-Version:1': 0.39; 'to:addr:python.org': 0.39; 'might': 0.39; 'missing': 0.40; 'called': 0.40; 'where': 0.40; 'easily': 0.61; 'life': 0.64; 'fall': 0.64; 'harder': 0.64; 'discovered': 0.69; 'become': 0.72; '__call__': 0.84; 'grows,': 0.84; 'methods)': 0.84; 'notion': 0.84; 'subject:should': 0.84; 'subject:place': 0.91; 'tied': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: list(), tuple() should not place at "Built-in functions" in documentation Date: Tue, 19 Jul 2011 12:31:32 -0400 References: <89bfd3a2-e166-425d-99f6-997cc3ab18a5@v11g2000prn.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-74-109-121-73.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.18) Gecko/20110616 Lightning/1.0b2 Thunderbird/3.1.11 In-Reply-To: <89bfd3a2-e166-425d-99f6-997cc3ab18a5@v11g2000prn.googlegroups.com> 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: 51 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1311093108 news.xs4all.nl 23949 [2001:888:2000:d::a6]:45736 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:9886 On 7/19/2011 2:52 AM, Raymond Hettinger wrote: > On Jul 14, 6:21 pm, Inside wrote: >> As telling in the subject,because "list" and "tuple" aren't >> functions,they are types.Is that right? They are not instances of a class whose definition name includes the word 'Function'. They *are* things that can be called with the call operator () (because they have __call__ methods) and that, when called, map input objects to output objects. That is the mathematical notion of a function. It is also one thing that makes classes different from modules, which cannot be called. Classes *also* have other behaviors that functions do not, but that does not make them non-functions. Doing things besides programming Python does not make one not a Python programmer. > list() and tuple() are in the right place in the documentation > because they would be harder to find if listed elsewhere. Tools > like str(), int(), list(), tuple() etc tend to be used like > functions, so the current location in the docs is where they have > been for years. The location of anything (that is not missing from the index, which is a bug) is easily discovered using the index. > A simple fact of documentation that is that tools don't always fall > cleanly into distinct categories. This is more like a fact of life above the atomic level. As the number of things classified grows, most classifications tend to become controversial. > Accordingly, the Library Reference > includes str,int,list,tuple, etc in both Section 2 for > builtin functions and Section 5 for builtin types. Chapter 5 is mostly about the behavior of built-in class instances. For some classes, like range, instances only come from class calls and the behavior of instances is intimately tied to the constructor arguments. Having the constructor described in C.5 might be useful. For others, like int, instances come from many sources and the behavior of instances only depends on the resulting value and not the source. Ints can come from literals, computation, and int calls with int, other number, or string objects. The allowed argument issues for int calls are quite separate from using int, so it really belongs in C.2. I agree that it is best to list all named built-in classes in C.2 with appropriates links to C.5 (and v.v.). There is a current tracker issue to add the few links that are missing from C.2 to C.5. -- Terry Jan Reedy