On Dec 9, 9:28 am, MRAB <[EMAIL PROTECTED]> wrote: > I certainly wouldn't want something like PL/I, where "IF", "THEN" and > "ELSE" could be identifiers, so you could have code like: > > IF IF = THEN THEN > THEN = ELSE; > ELSE > ELSE = IF;
Although I agree with the sentiment, you can write uncomprehensibly insane code in any language; Python already gives a lot of horsepower to run wild with metaclass magic, bytecode hacking, etc. The fact that you *can* write abominations as the above doesn't mean that you should; the OP's use case - using "foo.as(int)" - is pretty reasonable and readable. I believe the responsibility to not abuse the power of the language should be on the application programmer, not the language designer. George -- http://mail.python.org/mailman/listinfo/python-list