From a0307c343d875bdec4cb1ba2989da0df4bbbe074 Mon Sep 17 00:00:00 2001 From: Josuah Demangeon Date: Sun, 12 Mar 2023 13:38:10 +0100 Subject: [PATCH] docs: disambiguate Cat(a, b, ...) support for more than 2 arguments I had this confusion while reading the doc. Someone else also likely did: https://github.com/bl0x/learn-fpga-amaranth/blob/main/06_alu/soc.py#L111 --- docs/lang.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/lang.rst b/docs/lang.rst index 721dff8..74915ba 100644 --- a/docs/lang.rst +++ b/docs/lang.rst @@ -707,7 +707,7 @@ Operation Description Notes .. [#opS1] Words "length" and "width" have the same meaning when talking about Amaranth values. Conventionally, "width" is used. .. [#opS2] All variations of the Python slice notation are supported, including "extended slicing". E.g. all of ``a[0]``, ``a[1:9]``, ``a[2:]``, ``a[:-2]``, ``a[::-1]``, ``a[0:8:2]`` select bits in the same way as other Python sequence types select their elements. -.. [#opS3] In the concatenated value, ``a`` occupies the least significant bits, and ``b`` the most significant bits. +.. [#opS3] In the concatenated value, ``a`` occupies the least significant bits, and ``b`` the most significant bits. Any number of arguments (zero, one, two, or more) are supported. For the operators introduced by Amaranth, the following table explains them in terms of Python code operating on tuples of bits rather than Amaranth values: