For those times when a simple rCLNonerCY marker element is not sufficient, this will be very convenient.
Lawrence DrCOOliveiro <ldo@nz.invalid> writes:
For those times when a simple rCLNonerCY marker element is not
sufficient, this will be very convenient.
object() has always worked for me.
On Sun, 10 May 2026 21:01:00 -0700, Paul Rubin wrote:
Lawrence DrCOOliveiro <ldo@nz.invalid> writes:
For those times when a simple rCLNonerCY 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. ThatrCOs 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 rCLisrCY comparison fails if you should (inadvertently or
otherwise) make a copy of your sentinel object.
A new feature coming in Python 3.15 is the rCLsentinelrCY 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 rCLNonerCY marker element is not sufficient, this will be very convenient. <SNIP>
On 5/10/26 19:17, Lawrence DrCOOliveiro wrote:
A new feature coming in Python 3.15 is the rCLsentinelrCY 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 rCLNonerCY 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.
Oh well, there's an opportunity here for someone to excise the noisy
PEPs and create Python Lite.
On Mon, 11 May 2026 19:51:21 -0500, Tim Daneliuk wrote:
On 5/10/26 19:17, Lawrence DrCOOliveiro wrote:
A new feature coming in Python 3.15 is the rCLsentinelrCY 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 rCLNonerCY 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.
Tim Daneliuk <info@tundraware.com> writes:
Oh well, there's an opportunity here for someone to excise the noisy
PEPs and create Python Lite.
https://micropython.org
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 65 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 07:59:19 |
| Calls: | 862 |
| Files: | 1,311 |
| D/L today: |
1 files (1,366K bytes) |
| Messages: | 264,936 |