Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Pass variable as final

Open
#1,557 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
python

Research direction

Start by reading the linked CPython issue #113654 and reviewing how Final is currently used in Python typing. The proposal needs a settled specification for parameter annotations and an agreed typing-ecosystem change before implementation can be scoped; done would require an accepted design and corresponding repository updates.

Written by the indexing model from the issue text.

Description

topic: feature

Proposal:
The idea is to be able to pass variables as constants, mimicking c++ or rust behaviour such as. And have this be solely as part of the typings ecosystem. It's extremely helpful when reviewing code, or starting to use new codebases.

Issue opened in cpython repo: #113654

fn my_function(mut changeable: &String, unchangeable: &String) {}

In python I suggest the following:

def my_function(changeable: str, unchangeable: Final[str])-> None:
    arguments_that_changes += "world!"
    return arguments_that_changes + argument_that_stays_constant
Dominant language
Python
Stars
1.8k
Forks
302
Avg merge
23h
Merged PRs (30d)
8

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from python/typing

All issues in python/typing

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.