Jonathan Gardner <jgard...@jonathangardner.net> writes: >> What about assert, import, and pass? >... > For instance, how can you call an "if" function ... > If "yield", "break", and "continue" were functions, ... > "import" ... does something very special. It assigns > to values in the namespace of the code from which it was called. > In the end, print is a great candidate for a function,
Reasonable point about import. "If", "yield", "break", and "continue" are irrelevant if one accepts the flow control argument, although there is already expression syntax for "if" and "yield". What about assert and pass? > Also, note that statements allow you to combine many statements into > one. Python's rule is that you can't pass statements to a function, But if we're going around introducing changes that break things, why not get rid of that silly restriction? I don't mind that 3.x is breaking stuff for the sake of improving things. That's the whole idea of 3.x, after all. What bugs me is that the improvements are mostly quite superficial, and the breakage seems often gratuitous. I'd rather see much more drastic changes and correspondingly much larger improvements. Right now I rent an apartment in a city where real estate values have dropped a couple percent in the past few years. So in principle, I could move to a 2% bigger apartment while paying the same rent, or move to a similarly sized apartment while paying 2% less. Either of those is objectively an improvement, but am I going to do it? Hell no--moving even down the same street is way too big a hassle to even consider doing it for such a tiny gain. But if the "2%" were replaced by 3x or 5x, the proposition would be a heck of a lot more attractive, even if I had to move a larger distance. That's sort of the way I feel about switching from Python 2.x to 3.x. -- http://mail.python.org/mailman/listinfo/python-list