In article <[EMAIL PROTECTED]>, Cristian <[EMAIL PROTECTED]> wrote: ...
> To someone who's learning to program wouldn't a syntax like the > further give them all they need and also reinforces the idea that > functions are data just like everything else? > > my_function = function(foo, bar): pass > an_instance_method = function(self, foo): pass > a_method_declaration = method(self, foo): pass I think one followup has already alluded to the division between Python `statements' and `expressions'. The `def' statement may create and bind a value, but since it's a statement and not an expression, it doesn't have any value. Python is not a functional programming language. It probably could be reinvented to eliminate statements, but ... there are already plenty of languages to choose from. If we're going there, though, I think it's obvious that once you have defined an_instance_method = function(self, foo): ... it should be invoked an_instance_method(an_instance, foo) which would be much less messy in nested expressions where the current standard OOP notation flips from right to left too much ... string.join(x.split('-'), '').lower() --> lower(string.join('', split(x, '-'))) It might make for some interesting problems, but that's what it's about, changing things so it stays fun for everyone. At the same time, partial function parameter binding should be implemented, so you could say dotted = string.join('.') ... v = dotted(['comp', 'lang', 'python']) As you probably well know, that isn't my idea, it's a common functional programming language idiom. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list