msgid "" msgstr "" "Project-Id-Version: Tecno Recursos 2023Report-Msgid-Bugs-To:POT-Creation-" "Date:2023-07-20 19:13+0200PO-Revision-Date:YEAR-MO-DA HO:MI+ZONELast-" "Translator:FULL NAME Language:enLanguage-Team:en " "Plural-Forms:nplurals=2; plural=(n != 1)MIME-Version:1" ".0Content-Type:text/plain; charset=utf-8Content-Transfer-Encoding" ":8bitGenerated-By:Babel 2.9.0\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2024-01-17 15:45+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.9.0\n" #: ../../source/python-funciones-scope.rst:10 msgid "Alcance de las variables" msgstr "Variable Scope" #: ../../source/python-funciones-scope.rst:11 msgid "" "Ahora que se han visto las variables y los bloques de programa, tanto las" " funciones como los bucles, se puede estudiar el alcance de las " "variables." msgstr "" "Now that you have seen variables and program blocks, both functions and " "loops, you can study the scope of variables." #: ../../source/python-funciones-scope.rst:15 msgid "" "Las variables externas se pueden utilizar dentro de los bloques pero no " "al revés. Las variables internas de un bloque no se pueden utilizar fuera" " del bloque." msgstr "" "External variables can be used inside blocks but not the other way " "around. Variables internal to a block cannot be used outside the block." #: ../../source/python-funciones-scope.rst:19 msgid "" "Veremos algunos ejemplos del alcance de las variables, es decir, dónde se" " pueden utilizar y dónde no." msgstr "" "We will see some examples of the scope of variables, that is, where they " "can be used and where not." #: ../../source/python-funciones-scope.rst:24 msgid "Sentencia ``global``" msgstr "``global`` statement" #: ../../source/python-funciones-scope.rst:25 msgid "" "Las variables globales son las que se definen en el cuerpo del programa " "no dentro de bucles o de funciones." msgstr "" "Global variables are those defined in the body of the program, not within" " loops or functions." #: ../../source/python-funciones-scope.rst:28 msgid "Ejemplo de variable global::" msgstr "Example of global variable::" #: ../../source/python-funciones-scope.rst:38 #: ../../source/python-funciones-scope.rst:62 #: ../../source/python-funciones-scope.rst:83 msgid "Salida::" msgstr "Exit::" #: ../../source/python-funciones-scope.rst:43 msgid "" "En el caso anterior, la variable global 'numero' se puede leer en el " "interior de la función 'mensaje()'." msgstr "" "In the above case, the global variable 'number' can be read inside the " "'message()' function." #: ../../source/python-funciones-scope.rst:46 msgid "" "Sin embargo, si intentamos actualizar la variable 'numero' dentro de la " "función 'mensaje()' no funcionará porque estamos creando dos variables. " "Una variable será la variable **global** 'numero' y otra será la variable" " **local** 'numero', que se llaman igual, pero son distintas." msgstr "" "However, if we try to update the 'number' variable inside the 'message()'" " function it won't work because we are creating two variables. One " "variable will be the **global** variable 'number' and another will be the" " **local** variable 'number', which have the same name, but are " "different." #: ../../source/python-funciones-scope.rst:51 msgid "" "Ejemplo de variable global y variable local del mismo nombre que generan " "un error::" msgstr "Example of global variable and local variable of the same name " "generating an error::" #: ../../source/python-funciones-scope.rst:69 msgid "" "Para arreglar el problema tenemos que utilizar la sentencia ``global`` " "que declara 'numero' como variable global, no local." msgstr "" "To fix the problem we have to use the ``global`` statement that declares " "'number' as a global variable, not a local one." #: ../../source/python-funciones-scope.rst:72 msgid "Ejemplo de variable global sin error::" msgstr "Example of global variable without error::"