[EMAIL PROTECTED] wrote:
I forgot to add the following:


setattr(C, "Ã", u"The letter Ã")
getattr(C, "Ã")

u'The letter \xe8'

print getattr(C, "Ã")

The letter Ã

But try this: >>> C.à File "<stdin>", line 1 C.â ^ SyntaxError: invalid syntax


Python identifiers can be generic strings, including Latin-1 characters;

I don't think so. You have hacked an attribute with latin-1 characters in it, but you haven't actually created an identifier.


According to the language reference, identifiers can only contain letters a-z and A-Z, digits 0-9 and underscore.
http://docs.python.org/ref/identifiers.html


Kent
--
http://mail.python.org/mailman/listinfo/python-list
  • ... Kent Johnson
    • ... michele . simionato
      • ... Kent Johnson
    • ... Serge . Orlov
      • ... Leif K-Brooks
        • ... Serge Orlov
    • ... Scott David Daniels
      • ... Michel Claveau - abstraction méta-galactique non triviale en fuite perpétuelle.
        • ... Serge Orlov
          • ... Michel Claveau - abstraction méta-galactique non triviale en fuite perpétuelle.
            • ... Serge Orlov

Reply via email to