Castle: The best Real-Time/Embedded/HighTech language EVER. Attempt 2
Revision | b36d513ce3001f5c9b9677d72513adb67a052e7b (tree) |
---|---|
Zeit | 2024-03-10 01:47:02 |
Autor | Albert Mietus < albert AT mietus DOT nl > |
Commiter | Albert Mietus < albert AT mietus DOT nl > |
Added doc: Parameter/Argument
@@ -12,16 +12,18 @@ | ||
12 | 12 | |
13 | 13 | @dataclass |
14 | 14 | class TypedParameter(AIGR): |
15 | - """This is many a helper class/struct to combine a parameter: a name and an type""" | |
16 | - name: str | |
15 | + """A parameter is a variable in a function/callable **definition**. | |
16 | + It acts as placeholder and has no specific value. In Castle, it always has a Type.""" | |
17 | + name: str # XXX ToDo str or ID? | |
17 | 18 | type: type |
18 | 19 | |
19 | 20 | @dataclass |
20 | 21 | class Argument(AIGR): |
21 | - """This is many a helper class/struct to combine a argument: a value and optional a name""" | |
22 | + """An argument is a value passed during function/callable **invocation**. | |
23 | + In Castle, we support both positional and named arguments. Hence, an argument can have a name.""" | |
22 | 24 | value: PTH.Any |
23 | 25 | _: KW_ONLY |
24 | - name: PTH.Optional[str]=None | |
26 | + name: PTH.Optional[str]=None # XXX ToDo str or ID? | |
25 | 27 | |
26 | 28 | |
27 | 29 | @dataclass |