|
24.
|
|
|
is equivalent to::
|
|
|
|
эквивалентно::
|
|
Translated and reviewed by
theadmin
|
|
|
|
Located in
../../source/python.rst:132
|
|
25.
|
|
|
One advantage of using the define statement is that it records the filename and line number at which the assignment occured, and makes that available to the navigation feature of the launcher.
|
|
|
|
Преимущество использования оператора define состоит в том, что он хранит имя файла и номер строки на которой произведено присваивание, и делает это доступным в навигации Launcher.
|
|
Translated and reviewed by
theadmin
|
|
|
|
Located in
../../source/python.rst:137
|
|
26.
|
|
|
Names in the Store
|
|
|
|
Имена в областях видимости
|
|
Translated and reviewed by
theadmin
|
|
|
|
Located in
../../source/python.rst:142
|
|
27.
|
|
|
The default place that Ren'Py stores Python variables is called the store. It's important to make sure that the names you use in the store do not conflict.
|
|
|
|
Место, где Ren'Py хранит переменные Python, называется областью видимости. Важно, чтобы имена, используемые вами в одной области, не конфликтовали.
|
|
Translated and reviewed by
theadmin
|
|
|
|
Located in
../../source/python.rst:144
|
|
28.
|
|
|
The define statement assigns a value to a variable, even when it's used to define a character. This means that it's not possible to use the same name for a character and a flag.
|
|
|
|
Оператор define присваивает переменной значение, даже если она определяет персонажа. Это значит, что нельзя использовать одно и то же имя для персонажа и флага.
|
|
Translated and reviewed by
theadmin
|
|
|
|
Located in
../../source/python.rst:148
|
|
29.
|
|
|
The following faulty code::
|
|
|
|
Следующий код::
|
|
Translated and reviewed by
theadmin
|
|
|
|
Located in
../../source/python.rst:152
|
|
30.
|
|
|
will not work, because the variable `e` is being used as both a character and a flag. Other things that are usually placed into the store are transitions and transforms.
|
|
|
|
не будет работать, так как `e` используется как персонаж и как флаг. Другие вещи, помещаемые в область видимости - переходы и трансформации.
|
|
Translated and reviewed by
theadmin
|
|
|
|
Located in
../../source/python.rst:165
|
|
31.
|
|
|
Names beginning with underscore (\_) are reserved for Ren'Py's internal use. In addition, there is an :ref:`Index of Reserved Names <reserved-names>`.
|
|
|
|
Имена, начинающиеся с подчеркивания (\_) зарезервированы для внутреннего использования Ren'Py. Помимо этого, существует :ref:`Индекс зарезервированных имен <reserved-names>`.
|
|
Translated and reviewed by
theadmin
|
|
|
|
Located in
../../source/python.rst:169
|
|
32.
|
|
|
Other Named Stores
|
|
|
|
Другие области видимости
|
|
Translated and reviewed by
theadmin
|
|
|
|
Located in
../../source/python.rst:174
|
|
33.
|
|
|
Named stores provide a way of organizing python code into modules. By placing code in modules, you can minimize the chance of name conflicts.
|
|
|
|
Именованные области видимости предоставляют возможность организовать код Python по модулям. Храня код в модулях, можно избежать конфликтов имен.
|
|
Translated and reviewed by
theadmin
|
|
|
|
Located in
../../source/python.rst:176
|