<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 19 December 2014 at 20:57, Cem Karan <span dir="ltr"><<a href="mailto:cfkaran2@gmail.com" target="_blank">cfkaran2@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
But, getting back to the main question, is this a bug or a feature?  I personally feel like this is a bug, and I'd like to both clarify it in the language spec, and have cpython modified to enforce the syntax, regardless of how you try to mess with an attribute.  How does everyone else feel about this?<br></blockquote><div><br></div></div>Namespaces are just dictionaries. The one thing implementations may do is to place a type restriction on the keys, so they throw TypeError if you try to use something other than str (although *CPython* doesn't do that).<br><br>getattr/setattr/delattr would never throw SyntaxError though - that's only thrown by the compiler.<br><br>Cheers,<br>Nick.<br clear="all"></div><div class="gmail_extra"><br>-- <br><div class="gmail_signature">Nick Coghlan   |   <a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>   |   Brisbane, Australia</div>
</div></div>