-
vulture finds unused code in Python programs. It is useful for cleaning up and finding errors in large code bases.
Testing
Typing Checker
Lint Python Scripts
ruff
ruff is an extremely fast Python linter, written in Rust. It is preferred to other …
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
type bounds using the where clause
disable users from constructing instances of a struct and provide initialized instances (with …
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Rust has 3 different types of memory: static memory, stack memory and heap memory.
Static variables live in static memory and is determined at compile time. It is suggested that you define large data variables as static so that they live in the static memory instead of stack memory to avoid stack overflow problems. Of course, another way is to put those variables into heap memory (but at the cost of slight performance loss).
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
You can use the method Series.astype to cast the type of a series.
Series.astype(str) converts NaNs to the string literal nan.
This is often NOT what people want.
A better way is to use Series.astype(object)
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Enum is the preferred way to constrcut a sum type of several types (which does not implemente the same trait).
The Rust crate
either
provides an enum Either (with variants Left …
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!