> So, it's okay to setattr the attribute name "None" but not okay to set
> it directly?  Is this deliberate or is it an unintentional side effect
> of parser changes to prevent assignment to None?

It's deliberate. setattr(o, "foo bar", "baz") also works, even though
"foo bar" is not an identifier. setattr doesn't take the Python grammar
into account, but only the object's structure.

Regards,
Martin
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to