A robust tool to transpile Python source code into V(vlang) code.
All notable changes to this project are documented in this file.
The format is based on Keep a Changelog.
Latest commits not yet grouped into a release tag. See commits on GitHub for the full history.
~30 commits · PRs #464–#498
_pending_llm_call_comments in VNodeVisitor to inject AI-generated refactoring hints directly into generated V code.init() and main() to resolve duplicate fn main() errors in V._Impl struct and interface generation for Node, SymbolNode, and other base classes by using global class hierarchy instead of local type inference maps.i=i default argument pattern in lambdas (Issue #35).for/else blocks to V using state flags (Issue #29).VNodeVisitor property for emitter shadowed derived class attributes.@property.setter methods to match V requirements.vlangtr/parser to vlangtr/ast for better alignment with project goals.~50 commits · PRs #450–#463
TypeIs support for improved type narrowingt"...")ReadOnly fields in TypedDicttype Alias[T] = ...), variance support with scoped metadataTYPE_CHECKING constant supportissubclass() correct compilation in VAnnAssign class variable support (x: int = 0 at class body level)s[::-1]) now correctly transpiles to V idiomstartswith, endswith, center, etc.)mypy col_offset attribute check in type-guessing**kwargs handling and signature leakage in nested functionslist.pop(index), list.remove(value), list.count(value) transpilationdelete_many / insert_many helpers for slice assignments.clear() for lists now emits [] instead of {}py_format helper~100 commits · PRs #406–#449
analyzer.py, functions.py, base.py, classes.py, calls.pymypyc compilation support via setup.pyNoneType struct to correctly represent None as a V typeAny, NoneType, and boolean operations (Dynamic Types & None)is NoneType checksAny(NoneType{}) instead of empty call resultdict.get() or-block type mismatch in generated VAny() initialization instead of (expr as Any) for Any sum type?Type(none))none argument added to function calls with default argumentsProtocol[T] incorrectly embedded as struct field — now generates interfaceNone in lists, .count(None), and None in list translation[] instead of curly bracespub const () blocktype / builtins.type hints now map to V Any[attr] to @[attr]dict.get() and os.environ.get() visibilityPYTHONPATH modificationmypy plugin by caching AST nodes and hoisting importspy_string_formatjoin() using generator expressions~150 commits · PRs #334–#405
BaseModel → V struct, Field constraints, Config class, @field_validator / @model_validator//##LLM@@ markers for post-transpilation AI refactoring hintstyping.Literal mapping to V enums__type_params__ runtime attribute supporttyping.Callable proper V function type syntaxlist.extend() → V << ... spread operator@classmethod transpilation for generic classes and interfaceslist.append() → V push operator <<len() built-in → .len property.clone() on mutable collection assignments@staticmethod and @classmethod → prefixed global functionsmatch/case patterns__all__ module exports supportAdd docs about LLM comments documentationos module operations (Result/Error)math.log() argument mismatch and f64 castingdatetime module resolution and mappingjson.loads translation@overload function generation for __init__ methodsos.path check functions now infer bool return typemut arguments on primitive typesAny map keys to map[string] to satisfy V requirementsfix: map Python string methods splitlines and join to V equivalentsnarrowed_x identifiers~180 commits · PRs #252–#333
LiteralString supportTypeForm[T] supportdisjoint_base decorator supportexcept and except* clausesmatch/casememoryview and bytearray translation@dataclass perfect field inference using mypy plugin dataParamSpec and TypeVarTuple support (PEP 695)typing.assert_never → V panic@deprecated decoratorsix.moves and itertools compatibilitytyping.assert_type compile-time evaluationtyping.caststrict_optional via TOML config)*args and **kwargsTypedDict mapping to V structs__all__ exports and import * handling.pyi stub files supportNoReturn and typing.Any in stub function parameterssuper() constructor calls and __init__ generationobject base class auto-stripped from struct generationisinstance tuple checksStringIO / IO[str] → strings.Builder__str__/__repr__ V method mappingfloat__len__, __getitem__, etc.)%) formattingfor loops (bytes → characters)while x:)dict.items() iteration transpileint() cast on strings → V .int() method~100 commits · PRs #55–#250
--warn-dynamic CLI flag for profiler Any fallbacks--no-helpers and --helpers-only CLI flags.v file per directorytyping.overload)repr refactor: translated translator.py into a package with mixinssys.stderr redirection for print() callsplatform.python_implementation() → 'V'bytes(string, encoding) support[x] * N → V array initmain()Final variablestime.time() mapping precision to f64if/else blocks[None] * N) with proper type inferenceBaseClass.__init__() → struct embedding initializationsys.stderr handling~100 commits · PRs #30–#54
Any sum type with NoneType as a membervexc exception runtime for try/except and raise blockssend, throw, close)yield from, union types supportmatch/case) with class patterns and OR-patternscontextlib and typing module supporthasattr translation using static type information@deprecated decorator support (PEP 702)isinstance with tuple of typesfloor division, % format, pow, sort, round, string predicates**=, //=)**) transpilationast.TypeVar/ast.TypeAlias compatibilityexceptdel statement and .clear() for lists and dicts~200 commits · PRs #6–#29
hashlib, platform, subprocess, sqlite3, csv, urllib, http.client, socket, threading, functools, operator, itertools, collections, uuid, argparse, logging, shutil, tempfile, unittest, base64, zlib, gzip, pickle, statistics, fractions, array, struct, copy**kwargs in function definitions*args in function callsbytes literalsmatch/case) initial supportwalrus operator (:=)isinstance checksIntEnum translationspawn__main__ block unwrappingzip(), enumerate(), map(), filter(), any(), all(), reversed(), sorted() built-insrange() with step argumentprint() end= and sep= argumentsinput() functiondel statementliterals.py, expressions.py, control_flow.pyast.Index deprecation)__init__.py files, import corrections.real / .imag renaming in complex number support~30 commits · PRs #3–#5
mypy-based inference)if, for, while), classes, code generatorassert, global/nonlocalFirst 3 commits
py2v_transpiler/ package, setup.py, pytest.ini, mypy.ini)AGENTS.md guidelines for AI contributorsREADME.md