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


Groups > comp.lang.python > #9578

Re: Proposal to extend PEP 257 (New Documentation String Spec)

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!news2.euro.net!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 <rosuav@gmail.com>
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; 'plenty': 0.04; 'python?': 0.05; 'scripting': 0.05; 'formatting': 0.07; 'limit,': 0.07; 'python': 0.08; 'buffer.': 0.09; 'etc).': 0.09; "module's": 0.09; 'throw': 0.09; 'url:games': 0.09; 'programmer': 0.11; 'syntax': 0.11; 'am,': 0.13; 'received:209.85.214.174': 0.13; 'received :mail-iw0-f174.google.com': 0.13; 'wrote:': 0.15; 'allocate': 0.16; 'colons,': 0.16; 'conclusion:': 0.16; 'docstring': 0.16; 'docstrings': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'program...': 0.16; 'rantingrick': 0.16; 'subject:PEP': 0.16; "there'll": 0.16; 'utterly': 0.16; '16,': 0.16; 'tries': 0.16; 'useful,': 0.16; 'meant': 0.17; 'programming': 0.18; 'functions,': 0.19; 'stick': 0.19; 'language': 0.20; 'header:In-Reply-To:1': 0.22; 'away.': 0.23; 'etc,': 0.23; 'here?': 0.23; 'indentation': 0.23; 'optional': 0.23; 'obviously': 0.23; 'structure': 0.23; 'code': 0.24; 'function': 0.26; 'specifically': 0.26; "i'm": 0.27; 'language.': 0.28; 'received:209.85.214': 0.28; 'users.': 0.28; '(you': 0.28; 'character': 0.28; 'sat,': 0.28; 'message-id:@mail.gmail.com': 0.28; "didn't": 0.29; 'script': 0.29; 'not.': 0.30; 'clean.': 0.30; 'undocumented': 0.30; 'error': 0.31; 'shared': 0.32; 'named': 0.32; 'chris': 0.32; 'words,': 0.32; 'too': 0.32; 'does': 0.32; "what's": 0.33; 'actually': 0.33; 'to:addr:python-list': 0.34; 'there': 0.34; 'post': 0.34; 'things': 0.34; 'that,': 0.35; 'languages.': 0.35; 'structured': 0.35; 'define': 0.35; 'certain': 0.36; 'rules': 0.36; 'element': 0.37; 'things,': 0.37; 'some': 0.37; 'languages': 0.37; 'but': 0.37; 'could': 0.37; 'another': 0.38; 'received:google.com': 0.38; 'received:209.85': 0.38; 'subject:: ': 0.38; 'strong': 0.38; 'two': 0.38; 'should': 0.39; 'ways': 0.39; 'either': 0.39; "there's": 0.39; 'to:addr:python.org': 0.39; 'might': 0.39; 'received:209': 0.40; 'called': 0.40; 'where': 0.40; 'other.': 0.62; 'free': 0.63; 'further': 0.65; 'became': 0.67; 'freedom': 0.68; 'strange': 0.68; 'offer': 0.72; 'become': 0.72; 'secondary': 0.73; '"there': 0.84; 'game,': 0.84; 'good,': 0.91; 'wait,': 0.91; 'subject:Proposal': 0.93
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=AS4kOUZTIlqjJuqxYOdIgfjUlhkHYY3LaaT6PhXTPz4=; b=HPPG176T/SjhR8Z5cL4mTz+zuryMiMbH43Omt5s5rOqUoopVd9pK34CxOArCpRWcFz GYEWlfzR9eyTnh92iMLMnLLdNRG381iRxqYQLKLFlir+0Qqaav8Q7BHVbpfthQJjor19 MwNFkfpr0pGJopZCRy1NanQE3Xr6ZGCDEEg+4=
MIME-Version 1.0
In-Reply-To <cb71a0e9-741d-4406-ac8d-a85abbf7571c@g16g2000yqg.googlegroups.com>
References <120629e8-3b37-4e8c-a472-cd361de15de4@g9g2000yqb.googlegroups.com> <mailman.1048.1310714025.1164.python-list@python.org> <cb71a0e9-741d-4406-ac8d-a85abbf7571c@g16g2000yqg.googlegroups.com>
Date Sat, 16 Jul 2011 09:16:36 +1000
Subject Re: Proposal to extend PEP 257 (New Documentation String Spec)
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
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.1086.1310771799.1164.python-list@python.org> (permalink)
Lines 57
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1310771799 news.xs4all.nl 23868 [2001:888:2000:d::a6]:42636
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:9578

Show key headers only | View raw


On Sat, Jul 16, 2011 at 4:56 AM, rantingrick <rantingrick@gmail.com> wrote:
> Hmm, that's strange considering that code MUST be formatted in certain
> ways or you get a syntax error (indention, colons, parenthesis, etc,
> etc). I don't hear the masses claiming that they are going over to
> Ruby simply because of indention.

Not Ruby, but to other languages. There's this guy in my house named
Chris who tries his best to avoid Python if the code is going to be
shared over any "dodgy medium" where indentation might be damaged.
There are plenty of other languages that he can use... oh wait, that's
me. Yes, I frequently avoid Python specifically because of its
indentation issues. Does that mean I never use Python? No. Does it
mean I don't post here? Obviously not. Does it mean that further
restrictions can automatically be grandfathered in because "there are
already restrictions like this"? No.

> In my mind doc-strings should ALWAYS be optional HOWEVER if the
> programmer decides to create a doc-string THEN he must observe some
> syntax rules or his code will throw an SyntaxError. Remember, freedom
> is good, unbridled freedom is the root of all evil.

1) Every syntax element MUST add indentation.
2) Strong encouragement to stick to an 80-character line
Conclusion: Every big function will become two smaller functions, one
of which calls the other.
3) Every function that has a docstring MUST have it fully formatted.
Secondary conclusion: The only functions with docstrings are the ones
that are meant to be called externally.

In other words, docstrings will define the module's interface, and
there'll be a whole lot of utterly undocumented functions because they
didn't merit this massive structured docstring, and it became way way
too much work to factor things out. Either that, or people will just
start ignoring the 80 character limit, but I'm sure you could make
that mandatory - and that one would actually improve some things,
because any program that wants to read Python code needs only allocate
an 81-character buffer.

> So what's so terrible about structure Chris? Nobody's freedom are
> being taken away. You don't HAVE to create doc-strings, just like you
> don't HAVE to code with Python (you do free form formatting Ruby).
> Python is a language that is meant to be clean. Forced indention makes
> that possible. Forced doc-string syntax will complete the circle.

Python was also meant to be a programming language. Programming
languages offer freedom to their users. Without that freedom, it's not
a programming language but a script for another program... such things
can be useful, but are not the same.

This is not a true programming language:
http://www.kongregate.com/games/Coolio_Niato/light-bot

It's a reasonably fun game, but specifically _because_ it's so
restrictive. That is NOT what I want from a programming language or
even a scripting language.

Chris Angelico

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


Thread

Proposal to extend PEP 257 (New Documentation String Spec) rantingrick <rantingrick@gmail.com> - 2011-07-14 16:02 -0700
  Re: Proposal to extend PEP 257 (New Documentation String Spec) Ben Finney <ben+python@benfinney.id.au> - 2011-07-15 10:24 +1000
  Re: Proposal to extend PEP 257 (New Documentation String Spec) Michael Hrivnak <mhrivnak@hrivnak.org> - 2011-07-15 02:00 -0400
  Re: Proposal to extend PEP 257 (New Documentation String Spec) Chris Angelico <rosuav@gmail.com> - 2011-07-15 17:13 +1000
    Re: Proposal to extend PEP 257 (New Documentation String Spec) rantingrick <rantingrick@gmail.com> - 2011-07-15 11:56 -0700
      Re: Proposal to extend PEP 257 (New Documentation String Spec) Chris Angelico <rosuav@gmail.com> - 2011-07-16 09:16 +1000
        Re: Proposal to extend PEP 257 (New Documentation String Spec) rantingrick <rantingrick@gmail.com> - 2011-07-16 08:32 -0700
          Re: Proposal to extend PEP 257 (New Documentation String Spec) Chris Angelico <rosuav@gmail.com> - 2011-07-17 02:25 +1000
          Re: Proposal to extend PEP 257 (New Documentation String Spec) Andrew Berg <bahamutzero8825@gmail.com> - 2011-07-16 18:03 -0500
            Re: Proposal to extend PEP 257 (New Documentation String Spec) rantingrick <rantingrick@gmail.com> - 2011-07-16 16:25 -0700
              Re: Proposal to extend PEP 257 (New Documentation String Spec) Chris Angelico <rosuav@gmail.com> - 2011-07-17 09:45 +1000
          Re: Proposal to extend PEP 257 (New Documentation String Spec) Andrew Berg <bahamutzero8825@gmail.com> - 2011-07-16 18:44 -0500
      Re: Proposal to extend PEP 257 (New Documentation String Spec) Michael Hrivnak <mhrivnak@hrivnak.org> - 2011-07-16 15:23 -0400
        Re: Proposal to extend PEP 257 (New Documentation String Spec) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-07-17 13:10 +1000
          Re: Proposal to extend PEP 257 (New Documentation String Spec) Tim Chase <python.list@tim.thechases.com> - 2011-07-17 06:11 -0500
            Re: Proposal to extend PEP 257 (New Documentation String Spec) rantingrick <rantingrick@gmail.com> - 2011-07-17 10:30 -0700
      Re: Proposal to extend PEP 257 (New Documentation String Spec) Chris Angelico <rosuav@gmail.com> - 2011-07-17 09:09 +1000
  Re: Proposal to extend PEP 257 (New Documentation String Spec) George Rodrigues da Cunha Silva <georger.silva@gmail.com> - 2011-07-15 12:44 -0300

csiph-web