Skip to content

None Literal

None represents the absence of a value and corresponds to null in C#. It is used with T | None types for .NET interop:

value: str | None = None

Note: For Sharpy-native optionals, use None() (with parentheses) with T? (which is Optional[T]). Bare None is the C# null literal for T | None. See Optional Type.

Implementation - ✅ Native - Nonenull.