Deutsch   English   Français   Italiano  
<64f8b279$0$25964$426a74cc@news.free.fr>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!fu-berlin.de!uni-berlin.de!not-for-mail
From: <avi.e.gross@gmail.com>
Newsgroups: comp.lang.python
Subject: RE: for -- else: what was the motivation?
Date: Sun, 9 Oct 2022 23:57:40 -0400
Lines: 108
Message-ID: <mailman.597.1665374266.20444.python-list@python.org>
References: <433a0cd3-48b1-6aae-7bd0-f13828002947@declassed.art>
 <mailman.543.1665200362.20444.python-list@python.org>
 <jqchbfFf2hcU1@mid.individual.net>
 <bd6eaa01-1342-7c8f-212b-c12e9be7d6a4@declassed.art>
 <CAPTjJmqeXVYtTbTjCvLHtJ+0wJe68G3=xXTnnMt==q-KW6YxDQ@mail.gmail.com>
 <52599b91-d041-e239-f663-247847056c39@declassed.art>
 <CAPTjJmo7szX7LCY8AiD1GrTNtLj1u6zhOkKbNamkGkCtqDxQKQ@mail.gmail.com>
 <CABaFrRaM0gfn-bUmcQDgrmwbV6-cR8uLK=bEYaK39uOuMOxu8Q@mail.gmail.com>
 <20221009165629.5cphjckz4zzpnmgz@hjp.at>
 <af11a739-3c4d-66e4-a32d-72193d42eb05@DancesWithMice.info>
 <d8611ce2-b13a-4ad4-23ef-7334c902d193@mrabarnett.plus.com>
 <CAPTjJmr1HLf=7-Zv5kvp0xEaxJKhjhrNdobBBBcY_cav84TMtA@mail.gmail.com>
 <00a901d8dc5c$719fce30$54df6a90$@gmail.com>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de F03kYJGW6Kbk4yCFZUbN6QnnwzbcDm/lOSjmIqKlBL0Q==
Return-Path: <avi.e.gross@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
 reason="2048-bit key; unprotected key"
 header.d=gmail.com header.i=@gmail.com header.b=fS4tJ8TE;
 dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.023
X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'looks': 0.02; 'comments':
 0.03; 'searching': 0.05; 'variable': 0.05; 'exit': 0.07; 'loop':
 0.07; 'suggestion': 0.07; 'view,': 0.07; 'adapt': 0.09;
 'effectively': 0.09; 'ideas.': 0.09; 'identical': 0.09; 'moved':
 0.09; 'namespace': 0.09; 'order,': 0.09; 'rarely': 0.09;
 'textbook': 0.09; 'way?': 0.09; 'another.': 0.16; 'are.': 0.16;
 'caring': 0.16; 'characters.': 0.16; 'constraints.': 0.16;
 'declare': 0.16; 'definitions': 0.16; 'explicit': 0.16;
 'guarantees': 0.16; 'ignored': 0.16; 'languages.': 0.16; 'odd':
 0.16; 'php': 0.16; 'prefix': 0.16; 'studied': 0.16; 'subject: --
 ': 0.16; 'subject:else': 0.16; 'subject:what': 0.16; 'well-known':
 0.16; 'whatever.': 0.16; 'python': 0.16; 'says': 0.17; 'message-
 id:@gmail.com': 0.18; 'calls': 0.19; 'name.': 0.19; 'to:addr
 :python-list': 0.20; 'language': 0.21; 'languages': 0.22;
 'closed': 0.22; 'code': 0.23; 'lines': 0.23; '(and': 0.25;
 'examples': 0.25; 'cannot': 0.25; 'programming': 0.25; 'anyone':
 0.25; 'normally': 0.26; 'suspect': 0.26; 'task': 0.26; 'else':
 0.27; 'function': 0.27; 'done': 0.28; 'example,': 0.28; 'ideas':
 0.28; 'replying': 0.28; 'suggest': 0.28; 'suggestions': 0.28;
 'wrong': 0.28; 'whole': 0.30; 'seem': 0.31; 'comment': 0.31;
 'default': 0.31; 'modify': 0.31; 'putting': 0.31; 'think': 0.32;
 'carefully': 0.32; 'here,': 0.32; 'mark': 0.32; 'but': 0.32;
 'subject:for': 0.33; 'there': 0.33; 'particular': 0.33; 'someone':
 0.34; 'same': 0.34; 'mean': 0.34; 'header:In-Reply-To:1': 0.34;
 'received:google.com': 0.34; '"the': 0.35; 'felt': 0.35; 'fine':
 0.35; 'yes,': 0.35; 'close': 0.35; 'from:addr:gmail.com': 0.35;
 'functions': 0.36; 'people': 0.36; 'personal': 0.64; 'others,':
 0.64; 'thus': 0.64; 'your': 0.64; 'top': 0.65; 'parts': 0.65;
 'similar': 0.65; 'look': 0.65; 'body': 0.67; 'heard': 0.67;
 'maximum': 0.67; 'right': 0.68; 'items': 0.68; 'matter': 0.68;
 'further': 0.69; 'order': 0.69; 'area,': 0.69; 'discussing': 0.69;
 'end,': 0.69; 'lie': 0.69; 'within': 0.69; 'site': 0.70; 'front':
 0.70; 'them,': 0.70; 'ignore': 0.71; 'chance': 0.71; 'global':
 0.73; 'preferences': 0.73; 'easy': 0.74; 'tools': 0.74;
 'hundreds': 0.75; 'near': 0.76; 'conflict': 0.76; 'languages,':
 0.76; 'vary': 0.76; 'advise': 0.78; 'roles': 0.81; 'perfect':
 0.82; 'about,': 0.84; 'clause': 0.84; 'constraints': 0.84;
 'exceptions': 0.84; 'handled.': 0.84; 'imports': 0.84; 'periods':
 0.84; 'say,': 0.84; 'shot.': 0.84; 'spell': 0.84; 'varies': 0.84;
 'want.': 0.84; 'weird': 0.84; 'declaration': 0.91; 'reliable.':
 0.91; 'safely': 0.91; 'buried': 0.93; 'fall': 0.95; 'goals': 0.96
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=thread-index:content-language:content-transfer-encoding
 :mime-version:message-id:date:subject:in-reply-to:references:to:from
 :from:to:cc:subject:date:message-id:reply-to;
 bh=mkRFoxKIZdi8bPGgDhHnIyQW3zWvlF8exnMN+cpW9Tk=;
 b=fS4tJ8TEpktEnqRpSfiZf9aPxjTXKcRJDIhRXaRlUNrgjKQU5pRH+CPXo6Ja1Wqbb6
 E7zus71MT/ObFmZM4/DR8DBMTYAnLEXocJqncYIUBJzvDk6psM3ZZevkVPgjhi1HlfTp
 kCJPqQk4MU+hXGYyPUymDUTa0ZnA7VKwsX7A7vkX32Or1hi32u0yYslChcC3LwCxcDIk
 Ngfafj3SD8DoNO+CqN3B4B+CYluL+GBPcHco6sJJlzmEjiWsck+Oy+qokcX9MxxLyC7o
 5+N6EB8ASeoPB1a+7THgOll+MEfUcCZFTclGpwAJjS17xP57rPqULu7KsvXZpBm5rZCG
 PT6g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=thread-index:content-language:content-transfer-encoding
 :mime-version:message-id:date:subject:in-reply-to:references:to:from
 :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=mkRFoxKIZdi8bPGgDhHnIyQW3zWvlF8exnMN+cpW9Tk=;
 b=TS35SQFtJKXKGPt83YVEZw/dv+HkdgO/tznLlPUdj4kb8RQbxZdXd6sIRbhVoxM0cy
 O92edZYnVi3Tz1pKpouEAi2BU6cmPWsxrTUtZpyI9FsQJcD6lViOxYdDunOabi7YZdrh
 S8eee1DE85ViJrOQ95eo2KGnmqUdLiSDyEItabE+g2TNsLUqENePhPLhOr7gnX63Kzfe
 B0WYaaMwIgmltgZD9c8UcPxQ9qDlUGCEJSyWAgU9m9SHGScUtJQnjaRW/NlIjcoN11ox
 98zJD6rDafeRpV9V/0WRcNUIwMZTypaUJq3Wog0HdYNjIYF8iH8ZrZcmLMmouN3DPOZw
 Ehhw==
X-Gm-Message-State: ACrzQf3h7IhnU4+d9zJS1hw13OOeZ2xtt7BF7a1y01iu7AyxDb2Qgp7I
 V2djH0mObxtCQH+nddSiCCMX3bki7n4=
X-Google-Smtp-Source: AMsMyM5lCTS1rSnyLjWvqhK9flFSyeitHCI4vRNhStAmhoFDhp6ZUqVexttW1U+5FZQW/qtfq6iX6Q==
X-Received: by 2002:a05:620a:1aa9:b0:6e7:2d75:1d00 with SMTP id
 bl41-20020a05620a1aa900b006e72d751d00mr11585202qkb.575.1665374262459; 
 Sun, 09 Oct 2022 20:57:42 -0700 (PDT)
In-Reply-To: <CAPTjJmr1HLf=7-Zv5kvp0xEaxJKhjhrNdobBBBcY_cav84TMtA@mail.gmail.com>
X-Mailer: Microsoft Outlook 16.0
Content-Language: en-us
Thread-Index: AQJKuVBwmKjaYeNql+Ga/s9uC5ReqwIDelm7AZS5QN4CWGoy0QJQUaxzAmkEE5ABQg84qAEYJnezAfV0RhECHyd8sgIf/xOdAgAPrC6seXUZYA==
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
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: <https://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>
X-Mailman-Original-Message-ID: <00a901d8dc5c$719fce30$54df6a90$@gmail.com>
X-Mailman-Original-References: <433a0cd3-48b1-6aae-7bd0-f13828002947@declassed.art>
 <mailman.543.1665200362.20444.python-list@python.org>
 <jqchbfFf2hcU1@mid.individual.net>
 <bd6eaa01-1342-7c8f-212b-c12e9be7d6a4@declassed.art>
 <CAPTjJmqeXVYtTbTjCvLHtJ+0wJe68G3=xXTnnMt==q-KW6YxDQ@mail.gmail.com>
 <52599b91-d041-e239-f663-247847056c39@declassed.art>
 <CAPTjJmo7szX7LCY8AiD1GrTNtLj1u6zhOkKbNamkGkCtqDxQKQ@mail.gmail.com>
 <CABaFrRaM0gfn-bUmcQDgrmwbV6-cR8uLK=bEYaK39uOuMOxu8Q@mail.gmail.com>
 <20221009165629.5cphjckz4zzpnmgz@hjp.at>
 <af11a739-3c4d-66e4-a32d-72193d42eb05@DancesWithMice.info>
 <d8611ce2-b13a-4ad4-23ef-7334c902d193@mrabarnett.plus.com>
 <CAPTjJmr1HLf=7-Zv5kvp0xEaxJKhjhrNdobBBBcY_cav84TMtA@mail.gmail.com>
Bytes: 14024

>>>Which is more disparaging: "I couldn't find anyone suggesting this" or
"The only place I could find it was a PHP style guide"?
>>>ChrisA

Chris,

If someone says they heard something from their own personal guru, people
often do not feel threatened or argue. I often am told nutrition or medical
or other advice that I simply ignore especially if it is about exotic herbs
to use or weird ideas like homeopathy or that I should use language X
because it is the only way to a haven or heaven or whatever.

What we had here was someone suggesting their advice was WELL-KNOWN followed
by lots of people sputtering about not having heard of it. I actually think
the advice would be reasonable in many circumstances as long as it did not
conflict with dozens of goals I find more compelling but which vary on a
case by case basis such as whether I am prototyping something I will use
once, ...

I have studied PHP but have never felt a need to use it and arguably the
roles it has played are often done commonly by other programs or methods.
Some people might say the same for many languages that are going extinct or
that have had to change and adapt to keep being relevant. Had the user
mention this was advice given regarding programs in the original BASIC or in
COBOL or PASCAL or lots of other languages I may have once used but rarely
see much point in caring about, it would be no different.

But having ONE source is troublesome. I mean most languages used will
suggest some form of making some kinds of variable names meaningful within
various constraints. The constraints may be that the maximum length is
bounded or that it cannot start with a number (or perhaps underscore) or
contain some characters. But other advice varies enough that there is no
RIGHT or WRONG across languages. I have seen suggestion to use camelCase or
use periods or underscores between parts of a variable name. I have seen
suggestions to use a unique prefix or suffix to mark all your own variables
as a way to minimize the chance of namespace collisions. Some languages
suggest or even enforce that some names be all upper case or have an initial
uppercase letter while others should be completely lower case. I mean things
like function names versus method names versus class names and so on. 

The more global advice is ADVICE that suggests whatever method you choose,
be consistent. If you make class names a certain way, do it as much as
possible for all class names and avoid doing the same thing for non-class
names. I think quite a few suggestions fall into the category that they are
similar or abstractly enough suggested in many programming languages and by
many people. There may be a big enough consensus, perhaps with some
outliers, that it may be accepted as reasonable advice to not be ignored
without good reasons. 

So in my view, the objection is not about PHP but about uniqueness. If the
author of one Python textbook and no others, suggest that your code should
declare all imports in alphabetical order then declare all functions in
alphabetical order, they can not only safely be ignored, but perhaps not
taken seriously as imports sometimes need to be done carefully if something
needs something else and if a language needs functions to be defined before
another function body calls them, ...

I was not questioning that someone had heard this advice somewhere and did
not just make it up. Others searching had trouble finding it but that does
not prove anything. Someone finally found one example, which is fine and I
suspect there may be other examples found if the search was broader. I
suspect there are plenty of places that advise that you should write such
code so the main things is visible on the current screen and not buried
deeply.

But some people seem to miss a point we have discussed. The odd clauses like
========== REMAINDER OF ARTICLE TRUNCATED ==========