On 9/12/19 6:28 am, R.Wieser wrote:
Are you sure there's a difference between classes and functions here?Yes, quite sure.
And we're even more sure that there isn't. :-) Try it with a test module containing a class definition, a function definition and some top-level code that does something noticeable. You'll find that *any* form of import executes all the top-level code. -- Greg -- https://mail.python.org/mailman/listinfo/python-list