On Thu, 4 May 2017 09:30 am, Ned Batchelder wrote: > Functions, classes, and modules can also be referred to by a number of > variables: > > def foo(): pass > bar = baz = foo > > But functions (by virtue of the name in the def statement) have an > inherent name,
Indeed; but we also have anonymous functions: lambda arg: expression Technically all functions created with lambda do have a __name__ attribute, but since they're all the same, its the next best thing to anonymity. We can even have anonymous classes and modules: py> T = type('', (object,), {}) py> T <class '__main__.'> py> from types import ModuleType py> m = ModuleType('', '') py> m <module ''> -- Steve Emoji: a small, fuzzy, indistinct picture used to replace a clear and perfectly comprehensible word. -- https://mail.python.org/mailman/listinfo/python-list