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


Groups > comp.lang.python > #197782

Re: Coming In Python 3.15: Sentinel Values

Path csiph.com!news.neodome.net!usenet.network!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!tundraware.eternal-september.org!.POSTED!not-for-mail
From Tim Daneliuk <info@tundraware.com>
Newsgroups comp.lang.python
Subject Re: Coming In Python 3.15: Sentinel Values
Date Tue, 12 May 2026 09:52:55 -0500
Organization A noiseless patient Spider
Lines 41
Message-ID <7frbdm-qe01.ln1@oceanview.tundraware.com> (permalink)
References <10tr770$omms$1@dont-email.me> <95aadm-t721.ln1@oceanview.tundraware.com> <10tu41p$1jtti$5@dont-email.me>
MIME-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 8bit
Injection-Date Tue, 12 May 2026 15:01:02 +0000 (UTC)
Injection-Info tundraware.eternal-september.org; logging-data="2152918"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+3sGyYjSznUYELM+f+lYuehHPxQnkQdeE="; posting-host="dbc718cef053968c72beb73599a85e6d"
User-Agent Mozilla Thunderbird
Cancel-Lock sha1:Qp+YULDYa2wFaARgZsGUxs9ovc0= sha256:Q4lLdpk0fARxbVuLd1JIWmowHxgQAT3ugm+3a0SJ2vk= sha1:5nUmX+0Ww+7ebmobTYD1VyHW38I=
Content-Language en-US
In-Reply-To <10tu41p$1jtti$5@dont-email.me>
Xref csiph.com comp.lang.python:197782

Show key headers only | View raw


On 5/11/26 21:42, Lawrence D’Oliveiro wrote:
> On Mon, 11 May 2026 19:51:21 -0500, Tim Daneliuk wrote:
> 
>> On 5/10/26 19:17, Lawrence D’Oliveiro wrote:
>>>
>>> A new feature coming in Python 3.15 is the “sentinel” class, useful
>>> for creating custom values to mark the end of sequences of items, that
>>> kind of thing
>>> <https://docs.python.org/3.15/library/functions.html#sentinel>,
>>> <https://peps.python.org/pep-0661/>.
>>>
>>> For those times when a simple “None” marker element is not
>>> sufficient, this will be very convenient.
>>
>> Forgive me, but this smells of Feeping Creaturism to solve a not
>> very important question at the expense crufting up the language and
>> decreasing clarity.
> 
> In order to be forgiven, you will have to explain why you think so.
> Some of us have done enough Python programming that we can see the
> utility of such a feature, minor as it is.

I have also done plenty of Python programming (and C, and Fortran, and BASIC, and
many assemblers, and ...).

I stipulate that there is some utility to a sentinel feature.  But it does so at a
cost.  That cost is bloating the language definition with yet another feature that
has fairly limited application beyond what is already possible.

I've seen this happen over and over again in a variety of languages.  "Elegant"
solutions are proposed to legitimate problems but these solutions make the
language bigger, harder to master, and harder to maintain.

True elegance comes from a reduction of complexity and improving regularity while
expanding utility.  It does not come from just gluing on more and more new features.

I don't maintain Python, and the people who do are certainly welcome to add
anything they want.  I simply wanted to observe that - based on past history -
this will eventually lead to a bloated and less usable language.

It's an opinion, not a law of nature ...

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


Thread

Coming In Python 3.15: Sentinel Values Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-05-11 00:17 +0000
  Re: Coming In Python 3.15: Sentinel Values Paul Rubin <no.email@nospam.invalid> - 2026-05-10 21:01 -0700
    Re: Coming In Python 3.15: Sentinel Values Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-05-11 06:24 +0000
      Re: Coming In Python 3.15: Sentinel Values Jon Ribbens <jon+usenet@unequivocal.eu> - 2026-05-11 07:13 +0000
  Re: Coming In Python 3.15: Sentinel Values Tim Daneliuk <info@tundraware.com> - 2026-05-11 19:51 -0500
    Re: Coming In Python 3.15: Sentinel Values Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-05-12 02:42 +0000
      Re: Coming In Python 3.15: Sentinel Values Tim Daneliuk <info@tundraware.com> - 2026-05-12 09:52 -0500
    Re: Coming In Python 3.15: Sentinel Values Paul Rubin <no.email@nospam.invalid> - 2026-05-12 01:03 -0700
      Re: Coming In Python 3.15: Sentinel Values Tim Daneliuk <info@tundraware.com> - 2026-05-12 09:54 -0500

csiph-web