|
84.
|
|
|
Lists are used to represent containers where the number of items may vary. A list begins with a ``[``, contains a comma-separated list of expressions, and ends with ``]``. For example::
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/language_basics.rst:313
|
|
85.
|
|
|
:dfn:`Variable`
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/language_basics.rst:333
|
|
86.
|
|
|
Python expressions can use variables, that store values defined using the define statement or python statements. A variable begins with a letter or underscore, and then has zero or more letters, numbers, or underscores. For example::
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/language_basics.rst:323
|
|
87.
|
|
|
Variables beginning with _ are reserved for Ren'Py's use, and shouldn't be used by user code.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/language_basics.rst:332
|
|
88.
|
|
|
:dfn:`Field Access`
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/language_basics.rst:343
|
|
89.
|
|
|
Python modules and objects have fields, which can be accessed with by following an expression (usually a variable) with a dot and the field name. For example::
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/language_basics.rst:336
|
|
90.
|
|
|
Consists of a variable (config) followed by a field access (screen_width).
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/language_basics.rst:342
|
|
91.
|
|
|
:dfn:`Call`
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/language_basics.rst:362
|
|
92.
|
|
|
Python expressions can call a function which returns a value. They begin with an expression (usually a variable), followed by a left-parenthesis, a comma-separated list of arguments, and a right-parenthesis. The argument list begins with the position arguments, which are python expressions. These are followed by keyword arguments, which consist of the argument name, and equals sign, and an expression. In the example example::
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/language_basics.rst:346
|
|
93.
|
|
|
we call the Character function. It's given one positional argument, the string "Eileen". It's given two keyword argument: ``type`` with the value of the ``adv`` variable, and ``color`` with a string value of "#0f0".
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/language_basics.rst:356
|