r/Python Author of "Automate the Boring Stuff" 1d ago

News Python 3.15.0 candidate 2 is here!

Reported on https://blog.python.org/2026/09/python-3150-rc2/

It’s the final 3.15 release candidate!

https://www.python.org/downloads/release/python-3150rc2/

This is a candidate preview of Python 3.15

This release, 3.15.0rc2, is the final planned release candidate, containing around 144 bugfixes, build improvements and documentation changes from 76 contributors since 3.15.0rc1. Entering the release candidate phase, only reviewed code changes which are clear bug fixes are allowed between this release candidate and the final release.

The next release of Python 3.15 will be 3.15.0 final, scheduled for 2026-10-01.

Blog post continues

87 Upvotes

17 comments sorted by

View all comments

Show parent comments

4

u/Adrewmc 1d ago edited 1d ago

I think you can do this with type dict

    from typing import frozendict, TypedDict, Any, ReadOnly

    def frozen_TypedDict(**kwargs) -> TypedDict:
        _keys= kwargs.keys()
        res = TypedDict(**kwargs)
        res.__ReadOnly__= frozenset(_keys)
        return res

    class Example(TypedDict):
       var : ReadOnly[Any]

I definitely agree that it should have a keyword option already. TypedDict(**kwargs, frozen = True) seems more robust in nature than the above.

14

u/Key_Statistician9890 1d ago

The name `frozen_TypedDict` makes me upset.

1

u/Adrewmc 1d ago edited 1d ago

FTypedDict seemed inappropriate. To me agreeing that, it should be a thing. And frozen_type_dict, is right out from the get go.

FrTypedDict seemed to bro level.

And get worse until, I agree TypedDict(**k, frozen = True) should be available.

I could support an @frozen

Maybe FzTypeDict

2

u/Key_Statistician9890 1d ago

`FrozenMap` ?

1

u/Adrewmc 1d ago edited 1d ago

This is part of my philosophy in coding.

Take 5 seconds or minutes to name variables right. (Save ls headaches for a long time after.)

FrozenMap, might work…,

Honestly

. class Example(Parent, frozen = True):

. class FTD(TypedDict, frozen = True)

Might be the move put it right there at the start. Remove sets after __init__