KotlinIsland / KotlinIsland/basedmypy

new based syntax

Open
#737 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
202
Forks
6
PR merge metrics
No merged PRs in 30d

Description

stringizer will kill us, but anyway:

cpython compatible based syntax:
- `(str) > int` for callable syntax, annoyingly `ast` wont see the parens here
- `"foo" | "bar"` for string literals, will need to be a per module setting (also need a fallback option for forward refs #361)
- `f"a_{int}"` for template literals or w/e we call them

custom only based syntax:
- `def f[T: Overload[str, int]]():` for constrained types `T: (str, int)` is stupid
- `(int=, /, *, foo: str=, **bar: str) -> int` fullform callable syntax (`=` or `=...` for default?)

Contributor guide

Open the contributing guide

Research direction

The issue is a proposal for several new based syntax forms, including callable syntax, string literal alternatives, template literals, constrained types, and full-form callable signatures. No files, tests, or entry points are identified; first clarify the intended subset and per-module or fallback behavior. Done would require an agreed design and implementation scope for the selected syntax.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.