Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

6 May, 2024: The networking issue during the past two days has been identified and fixed.


devel / comp.lang.python / Re: learning python ...

SubjectAuthor
* Re: learning python ...Rob Cliffe
`* Re: learning python ...Michael F. Stemper
 `* Re: learning python ...Alan Gauld
  +* Re: learning python ...Jon Ribbens
  |`- Re: learning python ...Alan Gauld
  `- Re: learning python ...Michael F. Stemper

1
Re: learning python ...

<mailman.306.1621870019.3087.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=13282&group=comp.lang.python#13282

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: rob.cli...@btinternet.com (Rob Cliffe)
Newsgroups: comp.lang.python
Subject: Re: learning python ...
Date: Mon, 24 May 2021 15:32:57 +0100
Lines: 37
Message-ID: <mailman.306.1621870019.3087.python-list@python.org>
References: <143d4163-faf5-3794-095d-f28e85a18c58@adminart.net>
<s8e3bn$105v$1@ciao.gmane.io>
<6730da2c-1440-ad59-7494-b5ce5b5bccae@adminart.net>
<CACFDE8bsJe2BMNwsXAiGyxsMxNE+RuENj62GtfEzqodh5O_mMA@mail.gmail.com>
<5cec7f52-a66b-608c-4816-a3d8816658b2@adminart.net>
<CAPTjJmpOXQ0m4-=uty96t+K9VCvZ_7UWdzPOKYw-vocRFq50eQ@mail.gmail.com>
<6ad46670-a0b4-d556-3b03-284ffa451c89@adminart.net>
<a6812e72-2e58-bc57-7be4-2353e9955e48@btinternet.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de xFkw+DxC9mAuj4kBsOMJjwmJ04Wxq9pkqdvN1o6rmnTw==
Return-Path: <rob.cliffe@btinternet.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=btinternet.com header.i=@btinternet.com header.b=pwWHBFe0;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.051
X-Spam-Evidence: '*H*': 0.90; '*S*': 0.00; 'assumes': 0.04;
'subject:python': 0.06; 'beginner': 0.07; 'modified': 0.07;
'etc.).': 0.09; 'proposing': 0.09; 'python)': 0.09;
'received:192.168.1.64': 0.09; 'float,': 0.16; 'myself)': 0.16;
'suggesting': 0.16; 'unlikely': 0.16; 'wrote:': 0.16; 'python':
0.16; 'maybe': 0.20; 'language': 0.22; 'languages': 0.23;
'anyone': 0.23; 'to:addr:python-list': 0.23; 'list,': 0.23;
'anything': 0.24; 'suggest': 0.25; '(as': 0.27; 'effect': 0.28;
'header:User-Agent:1': 0.31; 'received:192.168.1': 0.31; 'but':
0.31; "doesn't": 0.32; "i'm": 0.32; 'decades': 0.32; 'keyword':
0.32; 'program': 0.33; 'using': 0.33; 'class': 0.33; 'header:In-
Reply-To:1': 0.33; 'same': 0.34; 'received:192.168': 0.37;
'change': 0.37; 'something': 0.38; 'to:2**1': 0.38; '8bit%:14':
0.39; "skip:' 10": 0.40; 'fun': 0.60; 'remember': 0.61; 'types':
0.63; 'world': 0.64; 'your': 0.64; 'experience': 0.64; 'widely':
0.65; 'well': 0.66; 'years': 0.67; 'day': 0.69; 'claim': 0.71;
'little': 0.75; 'happens': 0.75; '(like': 0.84; 'ridiculous.':
0.84; 'rob': 0.84; 'weird,': 0.84; 'you.\xc2\xa0': 0.84; 'views.':
0.91; 'keywords': 0.95
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=btinternet.com;
s=btmx201904; t=1621866778;
bh=ffRU8PikjOmAomg+LUaew7jQvEDTOiYb8HYE7VgD2mY=;
h=Subject:To:References:From:Message-ID:Date:MIME-Version:In-Reply-To;
b=pwWHBFe0Abl+c/E63sm+7mdehD3NX1Ty/vb4OE94va8MKH8Cp4CvRiIi1WKN/mG6T3ykcMQ0dK+ZQMjWaHXT4ZDudO8HRx/qD4A4QviqSSyYu2Hsd4pxtvyD01CdIlpqL3ZLztGjHl4awIw/VaP71Ji3ae7PdG/A3i8+i2U81Vk85l+SLxsAiH+YaQyuvjVpgjZDsIz9SvLeB+stPJCEIqwtcYLAVOhQPlLDCmNzsHFP0pEc85uonnbF0DrKdOjm8oCW5aJgvlOSNQJspidwC33UxIuleZvQYmxa/c8932Yp3MTYnL1T+o6yopiaSjcBpG7rZUAaVTqhkGsyJQydBg==
Authentication-Results: btinternet.com;
auth=pass (PLAIN) smtp.auth=rob.cliffe@btinternet.com
X-SNCR-Rigid: 603871800C4F25BC
X-Originating-IP: [86.141.17.174]
X-OWM-Source-IP: 86.141.17.174 (GB)
X-OWM-Env-Sender: rob.cliffe@btinternet.com
X-VadeSecure-score: verdict=clean score=0/300, class=clean
X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgeduledrvdejledgjeelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuueftkffvkffujffvgffngfevqffopdfqfgfvnecuuegrihhlohhuthemuceftddunecunecujfgurhepuffvfhfhkffffgggjggtsegrtderredtfeejnecuhfhrohhmpeftohgsucevlhhifhhfvgcuoehrohgsrdgtlhhifhhfvgessghtihhnthgvrhhnvghtrdgtohhmqeenucggtffrrghtthgvrhhnpefgueetgfegieeivddvledugffhheeulefhjeeuueejlefhledvgeeiheeftdefleenucfkphepkeeirddugedurddujedrudejgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopegludelvddrudeikedruddrieegngdpihhnvghtpeekiedrudeguddrudejrddujeegpdhmrghilhhfrhhomhepoehrohgsrdgtlhhifhhfvgessghtihhnthgvrhhnvghtrdgtohhmqecuuefqffgjpeekuefkvffokffogfdprhgtphhtthhopeeohhifsegrughmihhnrghrthdrnhgvtheqpdhrtghpthhtohepoehphihthhhonhdqlhhishhtsehphihthhhonhdrohhrgheq
X-RazorGate-Vade-Verdict: clean 0
X-RazorGate-Vade-Classification: clean
X-SNCR-hdrdom: btinternet.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.10.2
In-Reply-To: <6ad46670-a0b4-d556-3b03-284ffa451c89@adminart.net>
Content-Language: en-GB
X-Content-Filtered-By: Mailman/MimeDel 2.1.34
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.34
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: <a6812e72-2e58-bc57-7be4-2353e9955e48@btinternet.com>
X-Mailman-Original-References: <143d4163-faf5-3794-095d-f28e85a18c58@adminart.net>
<s8e3bn$105v$1@ciao.gmane.io>
<6730da2c-1440-ad59-7494-b5ce5b5bccae@adminart.net>
<CACFDE8bsJe2BMNwsXAiGyxsMxNE+RuENj62GtfEzqodh5O_mMA@mail.gmail.com>
<5cec7f52-a66b-608c-4816-a3d8816658b2@adminart.net>
<CAPTjJmpOXQ0m4-=uty96t+K9VCvZ_7UWdzPOKYw-vocRFq50eQ@mail.gmail.com>
<6ad46670-a0b4-d556-3b03-284ffa451c89@adminart.net>
 by: Rob Cliffe - Mon, 24 May 2021 14:32 UTC

On 24/05/2021 14:34, hw wrote:
>
> Your claim that I'm insulting python or anoyone is ridiculous.
> According to your logic, C is insulting python.  I suggest you stop
> making assumptions.
Calling a mature, widely used language "unfinished" because of what
*you* see as a defect *is* insulting.
(Of course, all languages evolve, and Python is no exception.  But the
change you are in effect proposing won't happen.)
And using a hectoring arrogant tone as a self-confessed Python beginner
when addressing veterans with decades of experience in *developing
Python* as well as developing with Python (disclosure: I'm not
describing myself) is unlikely to endear anyone to your views.

Python has few keywords (deliberately so), and anything that is not a
keyword can be used as an identifier.  That will stop your program from
crashing in 5 years time if a new built-in type is added to the language
that happens to have the same name as an identifier you used (like maybe
'quaternion'  'matrix'  'group'  'query', to imagine a few).

One day you may want to write (as you can in Python)

    class int(int):
        .....

to shadow the built-in 'int' type with a modified version.  I'm not
suggesting this has many real world applications, but it can be fun to
play with.  Python has a "consenting adults" policy: it assumes that if
you do something weird, you're doing it deliberately, and it doesn't try
to stop you.  I am sure after a little more experience with Python you
will remember the commonest built-in types (int, float, list, dict, str
etc.).

Regards
Rob Cliffe

Re: learning python ...

<s8gi8n$s45$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=13284&group=comp.lang.python#13284

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: mstem...@gmail.com (Michael F. Stemper)
Newsgroups: comp.lang.python
Subject: Re: learning python ...
Date: Mon, 24 May 2021 10:54:56 -0500
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <s8gi8n$s45$1@dont-email.me>
References: <143d4163-faf5-3794-095d-f28e85a18c58@adminart.net>
<s8e3bn$105v$1@ciao.gmane.io>
<6730da2c-1440-ad59-7494-b5ce5b5bccae@adminart.net>
<CACFDE8bsJe2BMNwsXAiGyxsMxNE+RuENj62GtfEzqodh5O_mMA@mail.gmail.com>
<5cec7f52-a66b-608c-4816-a3d8816658b2@adminart.net>
<CAPTjJmpOXQ0m4-=uty96t+K9VCvZ_7UWdzPOKYw-vocRFq50eQ@mail.gmail.com>
<6ad46670-a0b4-d556-3b03-284ffa451c89@adminart.net>
<a6812e72-2e58-bc57-7be4-2353e9955e48@btinternet.com>
<mailman.306.1621870019.3087.python-list@python.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 24 May 2021 15:55:03 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="51a98a6606ada0ad40b7836182f05efb";
logging-data="28805"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19qGtzL3qimWlfJiYv4zuDzPCiXeD9LhyU="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
Thunderbird/68.10.0
Cancel-Lock: sha1:8qIeU0hiZL3mDPVwBwXpnBZgkn8=
In-Reply-To: <mailman.306.1621870019.3087.python-list@python.org>
Content-Language: en-US
 by: Michael F. Stemper - Mon, 24 May 2021 15:54 UTC

On 24/05/2021 09.32, Rob Cliffe wrote:

> One day you may want to write (as you can in Python)
>
>     class int(int):
>         .....
>
> to shadow the built-in 'int' type with a modified version.  I'm not
> suggesting this has many real world applications, but it can be fun to
> play with.  Python has a "consenting adults" policy: it assumes that if
> you do something weird, you're doing it deliberately, and it doesn't try
> to stop you.  I am sure after a little more experience with Python you
> will remember the commonest built-in types (int, float, list, dict, str

In my early days of writing python, I created lists named "list",
dictionaries named "dict", and strings named "str". I mostly know better
now, but sometimes still need to restrain my fingers.

--
Michael F. Stemper
Nostalgia just ain't what it used to be.

Re: learning python ...

<mailman.317.1621899250.3087.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=13295&group=comp.lang.python#13295

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: alan.ga...@yahoo.co.uk (Alan Gauld)
Newsgroups: comp.lang.python
Subject: Re: learning python ...
Date: Tue, 25 May 2021 00:30:23 +0100
Lines: 25
Message-ID: <mailman.317.1621899250.3087.python-list@python.org>
References: <143d4163-faf5-3794-095d-f28e85a18c58@adminart.net>
<s8e3bn$105v$1@ciao.gmane.io>
<6730da2c-1440-ad59-7494-b5ce5b5bccae@adminart.net>
<CACFDE8bsJe2BMNwsXAiGyxsMxNE+RuENj62GtfEzqodh5O_mMA@mail.gmail.com>
<5cec7f52-a66b-608c-4816-a3d8816658b2@adminart.net>
<CAPTjJmpOXQ0m4-=uty96t+K9VCvZ_7UWdzPOKYw-vocRFq50eQ@mail.gmail.com>
<6ad46670-a0b4-d556-3b03-284ffa451c89@adminart.net>
<a6812e72-2e58-bc57-7be4-2353e9955e48@btinternet.com>
<mailman.306.1621870019.3087.python-list@python.org>
<s8gi8n$s45$1@dont-email.me> <s8hcuf$3eg$1@ciao.gmane.io>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de EKCKZYY6Wr0l6X1NC5V/eQyfuVeyTeWF5AioG4yUsRpg==
Return-Path: <python-python-list@m.gmane-mx.org>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.002
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'url-ip:65/8': 0.05;
'variable': 0.05; 'subject:python': 0.06; 'message-
id:@ciao.gmane.io': 0.09; 'newbie': 0.09;
'received:ciao.gmane.io': 0.09; 'received:gmane.io': 0.09;
'received:list': 0.09; 'descriptive': 0.16; 'flickr': 0.16;
'from:addr:alan.gauld': 0.16; 'from:name:alan gauld': 0.16;
'lesson': 0.16; 'mistake.': 0.16; 'photo-blog': 0.16;
'received:116.202': 0.16; 'received:116.202.254': 0.16;
'received:116.202.254.214': 0.16; 'url-ip:79.170.44.132/32': 0.16;
'url-ip:79.170.44/24': 0.16; 'url-ip:79.170/16': 0.16; 'url-
ip:79/8': 0.16; 'url:alan-g': 0.16; 'url:alan_gauld': 0.16;
'url:alangauldphotos': 0.16; 'wrote:': 0.16; 'name.': 0.20;
'url:amazon': 0.20; 'python,': 0.21; "i've": 0.22; 'to:addr
:python-list': 0.23; 'tutorials': 0.24; 'run': 0.24; 'purpose':
0.26; 'programmers': 0.27; 'mostly': 0.28; 'header:User-Agent:1':
0.31; 'think': 0.31; 'but': 0.31; 'program': 0.33; 'header:In-
Reply-To:1': 0.33; 'at:': 0.37; 'lists': 0.37; 'author': 0.38;
'learning': 0.38; 'days': 0.61; 'choose': 0.62; 'named': 0.63;
'follow': 0.63; 'back': 0.65; 'now,': 0.67; 'bad': 0.68; 'site':
0.69; 'michael': 0.69; 'url:author': 0.69; 'took': 0.70;
'received:116': 0.71; 'quickly': 0.81; 'guy': 0.84; 'severely':
0.84; 'strings': 0.84; 'type.': 0.84
X-Injected-Via-Gmane: http://gmane.org/
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.8.1
In-Reply-To: <s8gi8n$s45$1@dont-email.me>
Content-Language: en-GB
X-Mailman-Approved-At: Mon, 24 May 2021 19:34:09 -0400
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.34
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: <s8hcuf$3eg$1@ciao.gmane.io>
X-Mailman-Original-References: <143d4163-faf5-3794-095d-f28e85a18c58@adminart.net>
<s8e3bn$105v$1@ciao.gmane.io>
<6730da2c-1440-ad59-7494-b5ce5b5bccae@adminart.net>
<CACFDE8bsJe2BMNwsXAiGyxsMxNE+RuENj62GtfEzqodh5O_mMA@mail.gmail.com>
<5cec7f52-a66b-608c-4816-a3d8816658b2@adminart.net>
<CAPTjJmpOXQ0m4-=uty96t+K9VCvZ_7UWdzPOKYw-vocRFq50eQ@mail.gmail.com>
<6ad46670-a0b4-d556-3b03-284ffa451c89@adminart.net>
<a6812e72-2e58-bc57-7be4-2353e9955e48@btinternet.com>
<mailman.306.1621870019.3087.python-list@python.org>
<s8gi8n$s45$1@dont-email.me>
 by: Alan Gauld - Mon, 24 May 2021 23:30 UTC

On 24/05/2021 16:54, Michael F. Stemper wrote:

> In my early days of writing python, I created lists named "list",
> dictionaries named "dict", and strings named "str". I mostly know better
> now, but sometimes still need to restrain my fingers.

I think most newbie programmers make that mistake. I certainly
did when learning Pascal back in the 80's.

But I was lucky, the tutorials were run by a guy who penalized
bad variable names severely and took a half-mark off for every
bad name. We very quickly learned to choose names that were
descriptive of the purpose rather than the type.

Its a lesson that I've never forgotten!

--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos

Re: learning python ...

<slrnsaoee3.1q1s.jon+usenet@raven.unequivocal.eu>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=13296&group=comp.lang.python#13296

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: jon+use...@unequivocal.eu (Jon Ribbens)
Newsgroups: comp.lang.python
Subject: Re: learning python ...
Date: Mon, 24 May 2021 23:41:55 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <slrnsaoee3.1q1s.jon+usenet@raven.unequivocal.eu>
References: <143d4163-faf5-3794-095d-f28e85a18c58@adminart.net>
<s8e3bn$105v$1@ciao.gmane.io>
<6730da2c-1440-ad59-7494-b5ce5b5bccae@adminart.net>
<CACFDE8bsJe2BMNwsXAiGyxsMxNE+RuENj62GtfEzqodh5O_mMA@mail.gmail.com>
<5cec7f52-a66b-608c-4816-a3d8816658b2@adminart.net>
<CAPTjJmpOXQ0m4-=uty96t+K9VCvZ_7UWdzPOKYw-vocRFq50eQ@mail.gmail.com>
<6ad46670-a0b4-d556-3b03-284ffa451c89@adminart.net>
<a6812e72-2e58-bc57-7be4-2353e9955e48@btinternet.com>
<mailman.306.1621870019.3087.python-list@python.org>
<s8gi8n$s45$1@dont-email.me> <s8hcuf$3eg$1@ciao.gmane.io>
<mailman.317.1621899250.3087.python-list@python.org>
Injection-Date: Mon, 24 May 2021 23:41:55 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="959b52148f0d4754cdd363c80d3ff059";
logging-data="24034"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18HHjpTK+lpGxx2l4x63hr/k/CkxgJ8018="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:bwURvIku34rqbth5gf+16IKFIVo=
 by: Jon Ribbens - Mon, 24 May 2021 23:41 UTC

On 2021-05-24, Alan Gauld <alan.gauld@yahoo.co.uk> wrote:
> On 24/05/2021 16:54, Michael F. Stemper wrote:
>
>> In my early days of writing python, I created lists named "list",
>> dictionaries named "dict", and strings named "str". I mostly know better
>> now, but sometimes still need to restrain my fingers.
>
> I think most newbie programmers make that mistake. I certainly
> did when learning Pascal back in the 80's.
>
> But I was lucky, the tutorials were run by a guy who penalized
> bad variable names severely and took a half-mark off for every
> bad name. We very quickly learned to choose names that were
> descriptive of the purpose rather than the type.

Tricky when you're writing general utility functions.
What would you call the argument to a function that
returns, say, an upper-cased version of its input?
(Pretending for a moment that Python didn't already
have such a function built-in ;-) )

I mean, sure, you could call it "inputString" or
something but that sort of thing gets annoyingly
verbose very quickly. If you're using type
annotations then "input: str" would be ok but if
you're not then just "input" is overly opaque
(not to mention shadowing a builtin).

This is why it's good when languages have conventions
like "types and classes start with an upper-case letter",
so that you can do "string = String()" without problems...

Re: learning python ...

<mailman.336.1621957042.3087.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=13320&group=comp.lang.python#13320

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: alan.ga...@yahoo.co.uk (Alan Gauld)
Newsgroups: comp.lang.python
Subject: Re: learning python ...
Date: Tue, 25 May 2021 10:18:31 +0100
Lines: 26
Message-ID: <mailman.336.1621957042.3087.python-list@python.org>
References: <143d4163-faf5-3794-095d-f28e85a18c58@adminart.net>
<s8e3bn$105v$1@ciao.gmane.io>
<6730da2c-1440-ad59-7494-b5ce5b5bccae@adminart.net>
<CACFDE8bsJe2BMNwsXAiGyxsMxNE+RuENj62GtfEzqodh5O_mMA@mail.gmail.com>
<5cec7f52-a66b-608c-4816-a3d8816658b2@adminart.net>
<CAPTjJmpOXQ0m4-=uty96t+K9VCvZ_7UWdzPOKYw-vocRFq50eQ@mail.gmail.com>
<6ad46670-a0b4-d556-3b03-284ffa451c89@adminart.net>
<a6812e72-2e58-bc57-7be4-2353e9955e48@btinternet.com>
<mailman.306.1621870019.3087.python-list@python.org>
<s8gi8n$s45$1@dont-email.me> <s8hcuf$3eg$1@ciao.gmane.io>
<mailman.317.1621899250.3087.python-list@python.org>
<slrnsaoee3.1q1s.jon+usenet@raven.unequivocal.eu>
<s8ifd8$e39$1@ciao.gmane.io>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de VEEs4azU3Mu4tphobhznnwatN+mN/bEZ4kXP6/psKD2w==
Return-Path: <python-python-list@m.gmane-mx.org>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.001
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'argument': 0.04; 'string':
0.05; 'url-ip:65/8': 0.05; 'subject:python': 0.06; 'message-
id:@ciao.gmane.io': 0.09; 'received:ciao.gmane.io': 0.09;
'received:gmane.io': 0.09; 'received:list': 0.09; 'flickr': 0.16;
'from:addr:alan.gauld': 0.16; 'from:name:alan gauld': 0.16;
'photo-blog': 0.16; 'received:116.202': 0.16;
'received:116.202.254': 0.16; 'received:116.202.254.214': 0.16;
'similar.': 0.16; 'url-ip:65.9/16': 0.16; 'url-
ip:79.170.44.132/32': 0.16; 'url-ip:79.170.44/24': 0.16; 'url-
ip:79.170/16': 0.16; 'url-ip:79/8': 0.16; 'url:alan-g': 0.16;
'url:alan_gauld': 0.16; 'url:alangauldphotos': 0.16; 'wrote:':
0.16; 'url:amazon': 0.20; 'version': 0.22; 'exception': 0.23;
"i'd": 0.23; 'to:addr:python-list': 0.23; 'probably': 0.24;
'function': 0.28; 'single': 0.28; 'header:User-Agent:1': 0.31;
'there': 0.31; 'but': 0.31; 'teaching': 0.31; 'python-list': 0.32;
'program': 0.33; 'header:In-Reply-To:1': 0.33; 'at:': 0.37;
'change': 0.37; 'author': 0.38; "it's": 0.38; 'could': 0.40;
'follow': 0.63; 'site': 0.69; 'url:author': 0.69; 'received:116':
0.71; 'significant': 0.74; '(like': 0.84; 'exercise': 0.84; 'jon':
0.84; 'say,': 0.84; 'article:': 0.91
X-Injected-Via-Gmane: http://gmane.org/
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.8.1
In-Reply-To: <slrnsaoee3.1q1s.jon+usenet@raven.unequivocal.eu>
Content-Language: en-GB
X-Mailman-Approved-At: Tue, 25 May 2021 11:37:22 -0400
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.34
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: <s8ifd8$e39$1@ciao.gmane.io>
X-Mailman-Original-References: <143d4163-faf5-3794-095d-f28e85a18c58@adminart.net>
<s8e3bn$105v$1@ciao.gmane.io>
<6730da2c-1440-ad59-7494-b5ce5b5bccae@adminart.net>
<CACFDE8bsJe2BMNwsXAiGyxsMxNE+RuENj62GtfEzqodh5O_mMA@mail.gmail.com>
<5cec7f52-a66b-608c-4816-a3d8816658b2@adminart.net>
<CAPTjJmpOXQ0m4-=uty96t+K9VCvZ_7UWdzPOKYw-vocRFq50eQ@mail.gmail.com>
<6ad46670-a0b4-d556-3b03-284ffa451c89@adminart.net>
<a6812e72-2e58-bc57-7be4-2353e9955e48@btinternet.com>
<mailman.306.1621870019.3087.python-list@python.org>
<s8gi8n$s45$1@dont-email.me> <s8hcuf$3eg$1@ciao.gmane.io>
<mailman.317.1621899250.3087.python-list@python.org>
<slrnsaoee3.1q1s.jon+usenet@raven.unequivocal.eu>
 by: Alan Gauld - Tue, 25 May 2021 09:18 UTC

On 25/05/2021 00:41, Jon Ribbens via Python-list wrote:

> What would you call the argument to a function that
> returns, say, an upper-cased version of its input?

Probably 'candidate' or 'original' or 'initial' or
somesuch. Or even just 's'. Single character names
are OK when there is no significant meaning to convey!

But never a type name since the type could change or
be extended (like bytes or even a user defined string
subclass.)

The exception being where it's a teaching exercise
where the type is important, but even there I'd precede
it with an article: aString, the_string or similar.

--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos

Re: learning python ...

<s8jial$g6g$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=13330&group=comp.lang.python#13330

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: mstem...@gmail.com (Michael F. Stemper)
Newsgroups: comp.lang.python
Subject: Re: learning python ...
Date: Tue, 25 May 2021 14:14:20 -0500
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <s8jial$g6g$1@dont-email.me>
References: <143d4163-faf5-3794-095d-f28e85a18c58@adminart.net>
<s8e3bn$105v$1@ciao.gmane.io>
<6730da2c-1440-ad59-7494-b5ce5b5bccae@adminart.net>
<CACFDE8bsJe2BMNwsXAiGyxsMxNE+RuENj62GtfEzqodh5O_mMA@mail.gmail.com>
<5cec7f52-a66b-608c-4816-a3d8816658b2@adminart.net>
<CAPTjJmpOXQ0m4-=uty96t+K9VCvZ_7UWdzPOKYw-vocRFq50eQ@mail.gmail.com>
<6ad46670-a0b4-d556-3b03-284ffa451c89@adminart.net>
<a6812e72-2e58-bc57-7be4-2353e9955e48@btinternet.com>
<mailman.306.1621870019.3087.python-list@python.org>
<s8gi8n$s45$1@dont-email.me> <s8hcuf$3eg$1@ciao.gmane.io>
<mailman.317.1621899250.3087.python-list@python.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 25 May 2021 19:14:29 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="a6524dc4642e9654dc73bc0695464962";
logging-data="16592"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX188ZEZ/0+y6u+lhzotaK4xgX9eorpG67Qk="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
Thunderbird/68.10.0
Cancel-Lock: sha1:esIN89cDv2Oce0ZRhEFfU6fMak8=
In-Reply-To: <mailman.317.1621899250.3087.python-list@python.org>
Content-Language: en-US
 by: Michael F. Stemper - Tue, 25 May 2021 19:14 UTC

On 24/05/2021 18.30, Alan Gauld wrote:
> On 24/05/2021 16:54, Michael F. Stemper wrote:
>
>> In my early days of writing python, I created lists named "list",
>> dictionaries named "dict", and strings named "str". I mostly know better
>> now, but sometimes still need to restrain my fingers.
>
> I think most newbie programmers make that mistake. I certainly
> did when learning Pascal back in the 80's.
>
> But I was lucky, the tutorials were run by a guy who penalized
> bad variable names severely and took a half-mark off for every
> bad name. We very quickly learned to choose names that were
> descriptive of the purpose rather than the type.

And when I write code that models something physical, I'll create
an object with attributes named after the real-world attributes
that such an object has. For instance, a generator (NOT in the
python sense) might have attributes such as:
RealPower
ReactivePower
IncrementalCostCurve (an object all on its own)
DispatchedPower

But, when I mess around with number theory, if I need a dict
that has naturals as keys and their aliquot sums as values, it's
easy enough to fall into that trap; especially if I already have
a function AliquotSum() that populates the dictionary as it grows.

--
Michael F. Stemper
Deuteronomy 10:18-19

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor