--- Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Colin J. Williams a écrit : > > I'm not sure that I like add 3, 5, 7 > > > > but it would be nice to be able to drop the > parentheses > > when no argument is required. > > > > Thus: close; > > could replace close(); > > This just could not work given Python's object > model. The parens > actually *are* the call operator. >
I mostly agree with you, but in the specific use case of having just a single token on a line, you could argue that Python could DWIM on calling an object if the object is callable, since otherwise it's just a no-op. I think the argument against doing that is more based on explicit-vs.-implicit principle versus actual constraints of the object model. Another aspect of Ruby is that the final expression evaluated in a method actually gets returned as the result of a method, which has further implications on whether "close" is simply evaluated or called. ____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs -- http://mail.python.org/mailman/listinfo/python-list