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


Groups > comp.lang.python > #96191

Re: Python handles globals badly.

Path csiph.com!eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail
Return-Path <antoon.pardon@rece.vub.ac.be>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.007
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.05; 'guido': 0.05; 'received:134': 0.05; 'false.': 0.07; 'indicated': 0.07; 'ugly': 0.07; 'alternatives': 0.09; 'indication': 0.09; 'statements': 0.09; 'syntax': 0.13; 'do,': 0.15; 'argument.': 0.16; 'buggy': 0.16; 'conditional': 0.16; 'expression.': 0.16; 'poll': 0.16; 'prefered': 0.16; 'received:ac.be': 0.16; 'refactoring': 0.16; 'ternary': 0.16; 'two.': 0.16; 'element': 0.18; 'work,': 0.21; 'correctly.': 0.22; 'users,': 0.22; 'eager': 0.23; 'header:In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'developers': 0.26; 'function': 0.28; 'values': 0.28; 'fine': 0.28; 'fighting': 0.29; 'idea,': 0.29; "they'll": 0.29; 'thinks': 0.29; 'received:be': 0.30; 'users.': 0.31; 'implement': 0.32; 'statement': 0.32; 'useful': 0.33; 'steven': 0.33; 'worked': 0.34; 'list': 0.34; 'could': 0.35; 'something': 0.35; 'but': 0.36; 'too': 0.36; 'list,': 0.36; 'should': 0.36; 'there': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'really': 0.37; 'say': 0.37; 'support,': 0.37; 'things': 0.38; 'itself': 0.38; 'does': 0.39; "didn't": 0.39; 'enough': 0.39; 'rather': 0.39; 'to:addr:python.org': 0.40; 'where': 0.40; 'still': 0.40; 'some': 0.40; 'your': 0.60; 'show': 0.62; 'yes': 0.62; 'more': 0.63; 'different': 0.63; 'better.': 0.66; 'situation': 0.67; 'choose': 0.68; 'lack': 0.76; '*no': 0.84; "d'aprano:": 0.84; 'fought': 0.84; 'packing': 0.84; 'pardon': 0.84; 'schreef': 0.84; 'evaluation.': 0.91
X-IronPort-Anti-Spam-Filtered true
X-IronPort-Anti-Spam-Result An0HAPFJ8FWGuA9G/2dsb2JhbABdhDsBg0jBfgKCBAEBAQEBAYUvAQEDASNVBgsLGgIFFgsCAgkDAgECAUUTCAKIIgi1e5AQhCkBAQgCIIEihVGEe4QzYBeCUoFDBZVWjHqBTIcgjiCDbCaCEByBVodwgUgBAQE
Date Wed, 09 Sep 2015 17:04:00 +0200
From Antoon Pardon <antoon.pardon@rece.vub.ac.be>
User-Agent Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.8.0
MIME-Version 1.0
To python-list@python.org
Subject Re: Python handles globals badly.
References <c3363$547e74fe$5419aafe$24179@news.ziggo.nl> <4602a32c-5109-47dd-95bb-b9723738f07f@googlegroups.com> <55E8E09A.3080309@gmail.com> <msapn9$5aa$1@ger.gmane.org> <mailman.205.1441702743.8327.python-list@python.org> <55efa705$0$1653$c3e8da3$5496439d@news.astraweb.com>
In-Reply-To <55efa705$0$1653$c3e8da3$5496439d@news.astraweb.com>
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.269.1441811053.8327.python-list@python.org> (permalink)
Lines 41
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1441811053 news.xs4all.nl 23750 [2001:888:2000:d::a6]:36864
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:96191

Show key headers only | View raw


Op 09-09-15 om 05:27 schreef Steven D'Aprano:
>
>> Were those polls, like the poll he once did for the condtional expression?
>> There the poll indicated no specific proposal had a majority, so for each
>> specific proposal one could say it didn't have popular support, but the
>> majority still prefered to have a conditional expression. But at that
>> time Guido used that poll as an indication there was not enough support.
> In the case of conditional expression, there is *no good alternative*.

Yet there were people who passionatly argued against introducing one.
Even when list comprehensions were introduced where they really would
be useful some people still fought it.

Just to show that people fighting something is not a strong argument.

> Using if...then statement is too heavyweight, and cannot be used in an
> expression. Using "flag and true_value or false_value" is buggy -- it fails
> if true_value is itself false. Refactoring it to a function uses eager
> rather than lazy evaluation. So there was no existing alternative to a
> ternary if expression that worked correctly.

Yes there was. There were even two. One was packing your values into
a one element list, the other was packing them in a lambda. It was ugly
but it was what people came up with for lack of better.

> In the case of case/switch, there is no consensus on what the statement
> should do, how it should work, what purpose it has, or what syntax it
> should use. Rather than "there's no alternative to a case statement", the
> situation was more like "there are many good alternatives to the various
> different case statements people want".

Since when does Guido need a consensus? Look the developers have only limited
time, and they get to choose what they consider a priority and what they don't.
And if they think other things have higher priority, fine by me. But don't
come with, no support/consensus with the users, because if the dev-team thinks
something is a good idea, they'll implement it without much consideration for
support/consensus among the users.

-- 
Antoon Pardon 

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


Thread

Re: Python handles globals badly. tdev@freenet.de - 2015-09-03 12:05 -0700
  Re: Python handles globals badly. Ian Kelly <ian.g.kelly@gmail.com> - 2015-09-03 13:47 -0600
  Re: Python handles globals badly. Ian Kelly <ian.g.kelly@gmail.com> - 2015-09-03 13:51 -0600
  Re: Python handles globals badly. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-09-03 23:13 +0100
  Re: Python handles globals badly. Ian Kelly <ian.g.kelly@gmail.com> - 2015-09-03 16:45 -0600
  Re: Python handles globals badly. Michael Torrie <torriem@gmail.com> - 2015-09-03 18:06 -0600
  Re: Python handles globals badly. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-09-04 01:47 +0100
  Re: Python handles globals badly. Steven D'Aprano <steve@pearwood.info> - 2015-09-04 12:27 +1000
  Re: Python handles globals badly. Steven D'Aprano <steve@pearwood.info> - 2015-09-04 12:33 +1000
    Re: Python handles globals badly. Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-09-08 11:07 +0200
  Re: Python handles globals badly. Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-09-08 10:59 +0200
    Re: Python handles globals badly. Steven D'Aprano <steve@pearwood.info> - 2015-09-09 13:27 +1000
      Re: Python handles globals badly. Ian Kelly <ian.g.kelly@gmail.com> - 2015-09-08 23:08 -0600
      Re: Python handles globals badly. Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-09-09 17:04 +0200
      Re: Python handles globals badly. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-09-09 17:46 +0100
  Re: Python handles globals badly. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-09-08 10:22 +0100
  Re: Python handles globals badly. Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-09-08 11:59 +0200
  Re: Python handles globals badly. Laura Creighton <lac@openend.se> - 2015-09-08 12:07 +0200

csiph-web