On Jul 6, 11:42 am, Andrew Berg <bahamutzero8...@gmail.com> wrote: > On 2011.07.06 12:38 PM, Phlip wrote:> Python sucks. m = md5() looks like an > initial assignment, not a > > special magic storage mode. Principle of least surprise fail, and > > principle of most helpful default behavior fail. > > func() = whatever the function returns > func = the function object itself (in Python, everything's an object) > > Maybe you have Python confused with another language (I don't know what > exactly you mean by initial assignment). Typically one does not need > more than one name for a function/method. When a function/method is > defined, it gets created as a function object and occupies the namespace > in which it's defined.
If I call m = md5() twice, I expect two objects. I am now aware that Python bends the definition of "call" based on where the line occurs. Principle of least surprise. -- http://mail.python.org/mailman/listinfo/python-list