Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:" ': 0.03; 'python.': 0.04; 'context': 0.04; 'rejected': 0.04; '*not*': 0.05; 'classes.': 0.05; 'distinction': 0.07; 'terry': 0.07; 'type,': 0.07; 'python': 0.08; '>>>>': 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; 'meaningful': 0.13; 'wrote:': 0.15; '"here\'s': 0.16; '(before': 0.16; 'already.': 0.16; 'constructor.': 0.16; 'cpython,': 0.16; 'eliminated': 0.16; 'finney': 0.16; 'from:addr:behnel.de': 0.16; 'from:addr:stefan_ml': 0.16; 'from:name:stefan behnel': 0.16; 'subject:() ': 0.16; 'useless.': 0.16; 'looked': 0.16; 'pm,': 0.16; '>>>': 0.16; 'subject:list': 0.16; 'subject:skip:d 10': 0.17; 'describes': 0.19; 'example.': 0.19; '(which': 0.20; 'language': 0.20; "haven't": 0.21; 'subject:not': 0.21; '(but': 0.22; "aren't": 0.22; 'header:In-Reply-To:1': 0.22; 'expanded': 0.23; 'section.': 0.23; 'index': 0.25; 'expect': 0.25; 'writes:': 0.25; 'function': 0.26; 'helpful': 0.26; 'received:84': 0.28; 'extreme': 0.29; 'generic': 0.29; 'stefan': 0.29; 'object': 0.30; 'classes': 0.30; 'agreed.': 0.30; 'types.': 0.30; 'class': 0.31; 'required.': 0.31; 'separate': 0.31; 'cases': 0.32; 'proposed': 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; 'function.': 0.35; 'question': 0.35; '(with': 0.35; 'skip:" 10': 0.36; 'similar': 0.37; 'functions.': 0.37; 'things,': 0.37; 'but': 0.37; 'could': 0.37; 'received:org': 0.38; 'subject:: ': 0.38; 'back.': 0.38; 'patch': 0.38; 'steven': 0.38; 'something': 0.38; 'think': 0.38; 'case,': 0.38; 'considered': 0.38; 'common': 0.39; 'header:Mime- Version:1': 0.39; 'to:addr:python.org': 0.39; 'called': 0.40; 'sense': 0.40; 'table': 0.40; 'give': 0.60; 'basis': 0.62; 'full': 0.63; 'perfectly': 0.64; 'believe': 0.66; 'exact': 0.69; 'distinguish': 0.84; 'subject:should': 0.84; 'chapter.': 0.91; 'render': 0.91; 'subject:place': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Stefan Behnel Subject: Re: list(), tuple() should not place at "Built-in functions" in documentation Date: Fri, 15 Jul 2011 23:03:18 +0200 References: <4e1f989e$0$29990$c3e8da3$5496439d@news.astraweb.com> <87ipr4b9bu.fsf@benfinney.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: dslb-084-056-063-040.pools.arcor-ip.net User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110424 Lightning/1.0b2 Thunderbird/3.1.10 In-Reply-To: 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: 60 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1310763821 news.xs4all.nl 23943 [2001:888:2000:d::a6]:32828 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:9568 Terry Reedy, 15.07.2011 05:00: > On 7/14/2011 9:51 PM, Ben Finney wrote: >> Steven D'Aprano writes: >> >>> Inside wrote: >>> >>>> As telling in the subject,because "list" and "tuple" aren't functions,they >>>> are types.Is that right? > > At one time (before 2.2), they were functions and not classes. They are still functions in the sense that you can call them (with or without arguments) and get a result back. The exact distinction can be considered an implementation detail in most contexts. There are even extreme cases that render the distinction completely useless. Think of type(), for example. In its exceedingly most common use case, it does *not* create a type, even if it's a call to a type constructor. Something similar applies to a no-args call to tuple(), which does not create a new object in CPython, but only returns a new reference to a singleton. Types in Python are allowed to do these things, so it's not always meaningful to distinguish between typeX() being a call to a type or a function. >>> Yes they are types. But they can still be used as functions. Does it >>> matter? >> >> As a newcomer to the documentation I looked fruitlessly in the table of >> contents for a section that would contain the built-in types. “Built-in >> functions” was eliminated for the reason the OP states. >> >> I think it matters. (But I haven't proposed a documentation patch for it.) > > I once proposed, I believe on the tracker, that 'built-in functions' be > expanded to 'built-in function and classes'. That was rejected on the basis > that people would then expect the full class documentation that is in the > 'built-in types' section (which could now be called the built-isssn classes > section. > > A more exact title would be 'built-in callables', but that would be even > less helpful to newcomers. Callables are functions in the generic sense. I think "function" is about the best "expected" and "newcomer-friendly" name one can give to a "callable", especially in the context of a duck-typed, protocol-oriented language like Python. The section title in question describes perfectly its contents. It's a different question if a separate section like "here's a list of reference to the descriptions of types that Python provides in its builtins" is required. But I think we have that already. > In any case, the new index makes it easy to see what is in that chapter. Agreed. Stefan