Changeset 31
- Timestamp:
- 01/07/09 12:25:31 (4 years ago)
- bzr:base-revision:
- svn-v4:35130877-2dc0-4e93-869b-628e2b47754a:trunk:30
- bzr:committer:
- Gonzalo Delgado <gonzalo@bixly.com>
- bzr:file-ids:
traducidos/datastructures.rst 4@35130877-2dc0-4e93-869b-628e2b47754a:trunk%2Ftraducidos%2Fdatastructures.rst- bzr:mapping-version:
- v4
- bzr:repository-uuid:
- 35130877-2dc0-4e93-869b-628e2b47754a
- bzr:revision-id:
- gonzalo@bixly.com-20090701142735-zme4zs96fr3xmkv0
- bzr:revno:
- 31
- bzr:revprop:branch-nick:
- python-tutorial
- bzr:revprop:rebase-of:
- gonzalo@bixly.com-20090701142735-yuqvrytkue69p428
- bzr:root:
- trunk
- bzr:text-parents:
traducidos/datastructures.rst gonzalodel@gmail.com-20090629205748-7ulcdnplo2mnktk4- bzr:timestamp:
- 2009-07-01 11:27:35.996999979 -0300
- bzr:user-agent:
- bzr1.13.1+bzr-svn0.5.3
- svn:original-date:
- 2009-07-01T14:27:35.997000Z
- File:
-
- 1 edited
-
trunk/traducidos/datastructures.rst (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/traducidos/datastructures.rst
r29 r31 322 322 [(1, 4, 7), (2, 5, 8), (3, 6, 9)] 323 323 324 Ver :ref:`tut-unpacking-arguments` para detalles en el asteris kde esta línea.324 Ver :ref:`tut-unpacking-arguments` para detalles en el asterisco de esta línea. 325 325 326 326 .. _tut-del: 327 327 328 The :keyword:`del` statement 328 La instrucción :keyword:`del` 329 329 ============================ 330 330 331 There is a way to remove an item from a list given its index instead of its 332 val ue: the :keyword:`del` statement. This differs from the :meth:`pop` method333 which returns a value. The :keyword:`del` statement can also be used to remove334 slices from a list or clear the entire list (which we did earlier by assignment 335 of an empty list to the slice). For example::331 Hay una manera de quitar un ítem de una lista dado su índice en lugar de su 332 valor: la instrucción :keyword:`del`. Ésta es diferente del método :meth:`pop`, 333 el cual devuelve un valor. La instrucción :keyword:`del` también puede usarse 334 para quitar secciones de una lista o vaciar la lista completa (lo que hacíamos 335 antes asignando una lista vacía a la sección). Por ejemplo:: 336 336 337 337 >>> a = [-1, 1, 66.25, 333, 333, 1234.5] … … 346 346 [] 347 347 348 :keyword:`del` can also be used to delete entirevariables::348 :keyword:`del` puede usarse también para eliminar variables:: 349 349 350 350 >>> del a 351 351 352 Referenci ng the name ``a`` hereafter is an error (at least until another value353 is assigned to it). We'll find other uses for :keyword:`del` later.352 Referenciar al nombre ``a`` de aquí en más es un error (al menos hasta que se 353 le asigne otro valor). Veremos otros usos para :keyword:`del` más adelante. 354 354 355 355
Note: See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/python-tutorial/chrome/site/your_project_logo.png)