Repository navigation
0.0.2
Release Notes
uv add --dev "basedpython>=0.0.2"operator dispatch
operator dispatch follows python's own rule:
an operation falls back past a dunder only for an operand outside its parameter's runtime domain
- a
.byoperator dunder tests its operand before its body runs, and returnsNotImplemented
outside the parameter's domain - a
.pyoperator dunder is checked against the operand python hands it: the body sees what's
outside the domain, and aNotImplementedinside the domain falls back NotImplementedis typed: a writtenNotImplementedTypereturn falls back, and.bydeclares it- an
__eq__or__ne__override may narrow its operand, or declareNotImplementedType - an operand that may share a subclass with a dunder's domain may reach it, so the operation may be
either side's answer; an exact, final or disjoint-base operand stays outside - a subclass's reflected dunder answers as its ancestor's own dunder does, and a class's
__gt__
as its own__lt__unless the class is final - a subclass's in-place dunder answers as its ancestor's binary dunder does, and an operator dunder
override takes only what the overridden dunder takes.invalid-reflected-dunderis now
invalid-operator-override
protocols
- a
protocollowers onto basedpython's own protocol base rather thantyping.Protocol;
lowering.compatibilityrestorestyping.Protocol.
runtime_checkableis reported, and the two kinds of protocol don't mix - a built package's
by.typedrecords whether it was lowered withlowering.compatibility, and a
project reads that package's protocols as it was built
other changes
- an abstract method is implemented by a class mixed in later in the mro, so
class E(D, Impl)is
implemented byImpl by initcreates the project's environment withuv sync, and themain.bytemplate no longer
callsmain()- the docs carry basedpython's logo and palette, show the python
bywrites beside the landing
page's example, and unfurl into a social card when shared
Install basedpython 0.0.2
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/KotlinIsland/basedpython/releases/download/0.0.2/basedpython-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/KotlinIsland/basedpython/releases/download/0.0.2/basedpython-installer.ps1 | iex"Download basedpython 0.0.2
Verifying GitHub Artifact Attestations
The artifacts in this release have attestations generated with GitHub Artifact Attestations. These can be verified by using the GitHub CLI:
gh attestation verify <file-path of downloaded artifact> --repo KotlinIsland/basedpythonYou can also download the attestation from GitHub and verify against that directly:
gh attestation verify <file-path of downloaded artifact> --bundle <file-path of downloaded attestation>