Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #9568

Re: list(), tuple() should not place at "Built-in functions" in documentation

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 <python-python-list@m.gmane.org>
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 <stefan_ml@behnel.de>
Subject Re: list(), tuple() should not place at "Built-in functions" in documentation
Date Fri, 15 Jul 2011 23:03:18 +0200
References <c420b618-bb1a-4c8f-a446-e33e6e938c93@glegroupsg2000goo.googlegroups.com> <4e1f989e$0$29990$c3e8da3$5496439d@news.astraweb.com> <87ipr4b9bu.fsf@benfinney.id.au> <ivoafv$aup$1@dough.gmane.org>
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 <ivoafv$aup$1@dough.gmane.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1075.1310763821.1164.python-list@python.org> (permalink)
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

Show key headers only | View raw


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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

list(),tuple() should not place at "Built-in functions" in documentation Inside <fancheyujian@gmail.com> - 2011-07-14 18:21 -0700
  Re: list(),tuple() should not place at "Built-in functions" in documentation Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-07-15 11:32 +1000
    Re: list(),tuple() should not place at "Built-in functions" in documentation Ben Finney <ben+python@benfinney.id.au> - 2011-07-15 11:51 +1000
      Re: list(), tuple() should not place at "Built-in functions" in documentation Terry Reedy <tjreedy@udel.edu> - 2011-07-14 23:00 -0400
      Re: list(), tuple() should not place at "Built-in functions" in documentation Stefan Behnel <stefan_ml@behnel.de> - 2011-07-15 23:03 +0200
    Re: list(), tuple() should not place at "Built-in functions" in documentation Chris Angelico <rosuav@gmail.com> - 2011-07-15 16:24 +1000
  Re: list(),tuple() should not place at "Built-in functions" in documentation rantingrick <rantingrick@gmail.com> - 2011-07-14 18:36 -0700
    Re: list(), tuple() should not place at "Built-in functions" in documentation Corey Richardson <kb1pkl@aim.com> - 2011-07-14 22:01 -0400
  Re: list(),tuple() should not place at "Built-in functions" in documentation Raymond Hettinger <python@rcn.com> - 2011-07-18 23:52 -0700
    Re: list(), tuple() should not place at "Built-in functions" in documentation Terry Reedy <tjreedy@udel.edu> - 2011-07-19 12:31 -0400
    Re: list(), tuple() should not place at "Built-in functions" in documentation Stefan Behnel <stefan_ml@behnel.de> - 2011-07-20 08:21 +0200
    Re: list(), tuple() should not place at "Built-in functions" in documentation Terry Reedy <tjreedy@udel.edu> - 2011-07-20 16:53 -0400

csiph-web