lib/python/src/spec.zig

daab053ee43316e1809a84551d573ddd1e5bf3d2

 1 //! The constants below name the one Python version whose subset the package implements and link to
 2 //! its documentation. Python changes between versions, so a reader who checks what a construct
 3 //! should do needs to know which version's rules apply. The target is Python 3.14.0, and its rules
 4 //! are written in the [Python 3.14 language reference](https://docs.python.org/3.14/reference/) and
 5 //! the [Python 3.14 library reference](https://docs.python.org/3.14/library/). The version,
 6 //! `language`, is recorded as three numbers. The two addresses, `reference` and `library`, sit
 7 //! beside it as strings.
 8 /// A Python release number in three parts: major, minor and micro. `language` is the one value of
 9 /// this type in the package, so a caller reads the targeted release as numbers.
10 pub const Version = struct {
11     /// The major version number, 3 in `language`.
12     major: u8,
13     /// The minor version number, 14 in `language`.
14     minor: u8,
15     /// The micro version number, 0 in `language`.
16     micro: u8,
17 };
18 
19 /// The Python release this package targets: 3.14.0. A caller or tool that needs the release as data
20 /// reads this constant. The package implements a subset of this release.
21 pub const language = Version{
22     .major = 3,
23     .minor = 14,
24     .micro = 0,
25 };
26 
27 /// The address of the Python 3.14 language reference, for a reader who needs the rules that the
28 /// package's syntax and meaning follow. The reference defines the syntax and meaning of the
29 /// language. The package follows the reference for the part of the language it supports.
30 pub const reference = "https://docs.python.org/3.14/reference/";
31 /// The address of the Python 3.14 library reference, for a reader who needs the documented behavior
32 /// of a built-in function the package provides. The library reference documents Python's built-in
33 /// functions and types. The package's built-in functions carry the names of Python's: `dict`,
34 /// `enumerate`, `iter`, `len`, `list`, `next`, `range`, `reversed` and `tuple`.
35 pub const library = "https://docs.python.org/3.14/library/";