expresiones regulares
Pedro Díaz Jiménez
pdiaz88 en terra.es
Mar Sep 11 19:05:50 CEST 2001
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
esta aplicando sobre una lista en vez de sobre una cadena.
Solucion: Mapea (map) la lista
Saludetes
Pedro
On Tuesday 11 September 2001 14:06, Sergio Rua wrote:
> Buenas!
>
> El día Sep/11/2001, Alvaro López Ortega escribía:
> > En el módulo string, la función replace.
>
> Lo he estado probando y me pasa esto:
> >>> lines=file.readlines()
> >>> lines=replace(lines,"auto","Mierda")
>
> Traceback (innermost last):
> File "<stdin>", line 1, in ?
> TypeError: argument 1: expected read-only character buffer, list found
>
>
>
> Un saludo,
>
> Sergio Rua <srua en esware.com>
> Departamento de Desarrollo
> http://comunidad.esware.com
- --
/*
* Pedro Diaz Jimenez: pdiaz88 en terra.es, pdiaz en acm.asoc.fi.upm.es
*
* GPG KeyID: E118C651
* Fingerprint: 1FD9 163B 649C DDDC 422D 5E82 9EEE 777D E118 C65
*
* http://planetcluster.org
* Clustering & H.P.C. news and documentation
*
*/
- --
"Go to Heaven for the climate, Hell for the company."
-- Mark Twain
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE7nkRunu53feEYxlERAtnJAJ9SwtYnKDmLO7ssCJ7vUCKJjv4GLgCfQ/He
MPDG+mAWHZKRVhy7srhcnJg=
=vhZ9
-----END PGP SIGNATURE-----
Más información sobre la lista de distribución Python-es