ASCII is now the default encoding for modules. It's now a syntax error if a module contains string literals with 8-bit characters but doesn't have an encoding declaration. In Python 2.4 this triggered a warning, not a syntax error. See PEP 263 ( http://www.python.org/peps/pep-0263.html ) for how to declare a module's encoding; for example, you might add a line like this near the top of the source file: # -*- coding: latin1 -*-
[^] # Re: ASCII devient l'encodage par défaut
Posté par alexissoft . En réponse au journal Python 2.5 beta 2. Évalué à 3.
Par contre la première ligne # -*- coding: utf-8 -*- existe encore.
Je cite http://docs.python.org/dev/whatisnew/ :