You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"`__repr__` to user-defined classes. It was originally described in :pep:"
36
40
"`557`."
37
41
msgstr""
42
+
"Este módulo provee un decorador y funciones para añadir :term:`special "
43
+
"method`\\es automáticamente, como por ejemplo :meth:`__init__` y :meth:"
44
+
"`__repr__`, a clases definidas por el usuario. Fue originalmente descrito "
45
+
"en :pep:`557`."
38
46
47
+
# 'variable miembo' para hacer énfasis en que cada miembro es una variable de un tipo determinado
39
48
#:../Doc/library/dataclasses.rst:19
49
+
#,fuzzy
40
50
msgid""
41
51
"The member variables to use in these generated methods are defined using :"
42
52
"pep:`526` type annotations. For example this code::"
43
53
msgstr""
54
+
"Cada variable miembro a utilizar en estos métodos generados son definidas "
55
+
"teniendo en cuenta :pep:`526` para anotaciones de tipo. Por ejemplo en este "
56
+
"código::"
44
57
45
58
#:../Doc/library/dataclasses.rst:32
46
59
msgid"Will add, among other things, a :meth:`__init__` that looks like::"
47
60
msgstr""
61
+
"Añadirá, además de otros métodos, un :meth:`__init__` con la siguiente "
62
+
"forma::"
48
63
49
64
#:../Doc/library/dataclasses.rst:39
50
65
msgid""
51
66
"Note that this method is automatically added to the class: it is not "
52
67
"directly specified in the ``InventoryItem`` definition shown above."
53
68
msgstr""
69
+
"Es importante observar que este método es añadido a la clase "
70
+
"automáticamente; está implícito en la definición de ``InventoryItem`` "
71
+
"implementada arriba."
54
72
55
73
#:../Doc/library/dataclasses.rst:45
56
74
msgid"Module-level decorators, classes, and functions"
57
-
msgstr""
75
+
msgstr"Decoradores, clases y funciones del módulo"
58
76
77
+
# Me genera duda la traduccion al español de 'generated special methods', alguien con conocimiento profundo de Python puede aportar para definir si tiene sentido la traduccion literaria 'metodos especiales generados', que quizas pueda llevar a confusion.
59
78
#:../Doc/library/dataclasses.rst:49
79
+
#,fuzzy
60
80
msgid""
61
81
"This function is a :term:`decorator` that is used to add generated :term:"
62
82
"`special method`\\s to classes, as described below."
63
83
msgstr""
84
+
"Esta función es un :term:`decorator` utilizado para añadir :term:`special "
85
+
"method`\\es generados a clases, como se describe a continuación."
64
86
65
87
#:../Doc/library/dataclasses.rst:52
66
88
msgid""
@@ -69,41 +91,59 @@ msgid ""
69
91
"<variable annotation>`. With two exceptions described below, nothing in :"
70
92
"func:`dataclass` examines the type specified in the variable annotation."
71
93
msgstr""
94
+
"El decorador :func:`dataclass` examina la clase para encontrar ``campo``\\s. "
95
+
"Un ``campo`` se define como una variable de clase que tiene una :term:"
96
+
"`anotación de variable <variable annotation>`. A excepción de los dos casos "
97
+
"descriptos debajo, nada en :func:`dataclass` examina el tipo especificado en "
98
+
"la anotación de variable."
72
99
73
100
#:../Doc/library/dataclasses.rst:58
74
101
msgid""
75
102
"The order of the fields in all of the generated methods is the order in "
76
103
"which they appear in the class definition."
77
104
msgstr""
105
+
"El orden de los campos en los métodos generados es el mismo en el que se "
106
+
"encuentran en la definición de la clase."
78
107
108
+
# "dunder" methods lo utilizan como sinonimo de metodos magicos (definidos con __ __)
79
109
#:../Doc/library/dataclasses.rst:61
80
110
msgid""
81
111
"The :func:`dataclass` decorator will add various \"dunder\" methods to the "
82
112
"class, described below. If any of the added methods already exist on the "
83
113
"class, the behavior depends on the parameter, as documented below. The "
84
114
"decorator returns the same class that is called on; no new class is created."
85
115
msgstr""
116
+
"El decorador :func:`dataclass` añade varios metodos mágicos a la clase, "
117
+
"descripto a continuación. Si algo de los métodos añadidos ya existe en la "
118
+
"definición de la clase, el comportamiento dependerá del parámetro. El "
119
+
"decorador devuelve la misma clase que es llamada, no crea una nueva."
86
120
87
121
#:../Doc/library/dataclasses.rst:67
122
+
#,fuzzy
88
123
msgid""
89
124
"If :func:`dataclass` is used just as a simple decorator with no parameters, "
90
125
"it acts as if it has the default values documented in this signature. That "
91
126
"is, these three uses of :func:`dataclass` are equivalent::"
92
127
msgstr""
128
+
"Si :func:`dataclass`es llamada sin parámetros, actúa con los valores por "
129
+
"defecto documentados aquí. Los siguientes tres usos de :func:`dataclass`son "
130
+
"equivalentes::"
93
131
94
132
#:../Doc/library/dataclasses.rst:84
95
133
msgid"The parameters to :func:`dataclass` are:"
96
-
msgstr""
134
+
msgstr"Los parámetros de :func:`dataclass` son:"
97
135
98
136
#:../Doc/library/dataclasses.rst:86
99
137
msgid""
100
138
"``init``: If true (the default), a :meth:`__init__` method will be generated."
101
139
msgstr""
140
+
"Si ``init`` == true (valor por defecto): el método :meth:`__init__` es "
141
+
"generado."
102
142
103
143
#:../Doc/library/dataclasses.rst:89
104
144
msgid""
105
145
"If the class already defines :meth:`__init__`, this parameter is ignored."
106
-
msgstr""
146
+
msgstr"Si la clase ya define :meth:`__init__`, este parámetro es ignorado."
0 commit comments