[Python] stringhe raw

Nicola Larosa nico a tekNico.net
Ven 7 Gen 2011 10:51:55 CET


Vito 'ZeD' De Tullio wrote:
> I primi due che mi vengono in mente a caso: il modulo "re" e, se sei
> su windows, i path hardcoded ('\\' è veramente orripilante da
> scrivere).

Tenendo anche presente che indicare il separatore di percorso su Windows
come r'\' non è portabile, mentre usare os.sep lo è.

Certo, poi occorre tener conto di molte altre differenze, usare os.sep
non è certo sufficiente, però è necessario.

-- 
Nicola Larosa - http://www.tekNico.net/

Collectively, we will eventually figure out that schools, as currently
structured, cost way too much, teach irrelevant material, have the op-
posite education effect for most of the students, crowd out more benef-
icial activities, break up families, and even create a long term effect
similar to a mild but long term post-traumatic stress disorder.
 - Clark Aldrich, August 2010


Maggiori informazioni sulla lista Python