| Deutsch English Français Italiano |
|
<Final-20250215204537@ram.dialup.fu-berlin.de> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!2.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!uni-berlin.de!not-for-mail
From: ram@zedat.fu-berlin.de (Stefan Ram)
Newsgroups: comp.lang.python
Subject: What I learned
Date: 15 Feb 2025 19:46:50 GMT
Organization: Stefan Ram
Lines: 17
Expires: 1 Mar 2026 11:59:58 GMT
Message-ID: <Final-20250215204537@ram.dialup.fu-berlin.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de bCnHJdFlfCLyX3P81qvBeQ8G97TDSJljQdbvoipBmf4lnt
Cancel-Lock: sha1:bppXAIwqJinL4B0AyFytG+w4+yw= sha256:a6ckY2zg/+8yXMRY/1Fm1SYh6VZkI9/NP+PKOKebaok=
X-Copyright: (C) Copyright 2025 Stefan Ram. All rights reserved.
Distribution through any means other than regular usenet
channels is forbidden. It is forbidden to publish this
article in the Web, to change URIs of this article into links,
and to transfer the body without this notice, but quotations
of parts in other Usenet posts are allowed.
X-No-Archive: Yes
Archive: no
X-No-Archive-Readme: "X-No-Archive" is set, because this prevents some
services to mirror the article in the web. But the article may
be kept on a Usenet archive server with only NNTP access.
X-No-Html: yes
Content-Language: en-US
Bytes: 1859
I caught a glimpse of a tome on Python wizardry for the big
leagues. Didn't exactly float my boat, but a couple nuggets
stuck like gum on a sidewalk:
Picking your container flavor can be a sneaky way of documentation,
leaving breadcrumbs for the next poor soul, hinting whether you're
cool with duplicate values or not. (But other times it's just about
efficiency.)
These days, you can slap "Final" on something (at least for
module variables) to tell it's not to be changed!
from typing import Final
a : Final = 2