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


Groups > comp.lang.python > #197777

Re: Coming In Python 3.15: Sentinel Values

Path csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From Lawrence D’Oliveiro <ldo@nz.invalid>
Newsgroups comp.lang.python
Subject Re: Coming In Python 3.15: Sentinel Values
Date Mon, 11 May 2026 06:24:32 -0000 (UTC)
Organization A noiseless patient Spider
Lines 15
Message-ID <10trsmv$tabj$3@dont-email.me> (permalink)
References <10tr770$omms$1@dont-email.me> <87qznibnnn.fsf@nightsong.com>
MIME-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8bit
Injection-Date Mon, 11 May 2026 06:24:32 +0000 (UTC)
Injection-Info dont-email.me; logging-data="960883"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/4LkMX8beiXHM4U/NwqcTj"; posting-host="27d7a2c03590b7e4e57883dc6640ff5a"
User-Agent Pan/0.165 (Kostiantynivka)
Cancel-Lock sha1:O8MG/zNsY6eX/dT7jHFQkKCbs98= sha256:bcUUec9Pi1Fkd0v8eS9MDyrKTkfwx2beNYNXmqYvQj4= sha1:iN/3UV6kYMH6TovghMTVe2QBi7I=
Xref csiph.com comp.lang.python:197777

Show key headers only | View raw


On Sun, 10 May 2026 21:01:00 -0700, Paul Rubin wrote:

> Lawrence D’Oliveiro <ldo@nz.invalid> writes:
>>
>> For those times when a simple “None” marker element is not
>> sufficient, this will be very convenient.
>
> object() has always worked for me.

I have done the same, on a few occasions. That’s been a common idiom
among Python programmers since practically forever. The PEP discusses
why this is less than an optimal solution: less-than-explanatory
diagnostics, and difficulty with type signatures for static typing.
Also, an “is” comparison fails if you should (inadvertently or
otherwise) make a copy of your sentinel object.

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