|
81.
|
|
|
Tuples are used to represent containers where the number of items is important. For example, one might use a 2-tuple (also called a pair) to represent width and height, or a 4-tuple (x, y, width, height) to represent a rectangle.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/language_basics.rst:297
|
|
82.
|
|
|
Tuples begin with a left-parenthesis ``(``, consist of zero or more comma-separated python expressions, and end with a right-parenthesis ``)``. As a special case, the one-item tuple must have a parenthesis following the item. For example::
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/language_basics.rst:302
|
|
83.
|
|
|
:dfn:`List`
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/language_basics.rst:320
|
|
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
|