Jason Keene firstname.lastname@example.org writes:
In a way they do the same thing, they both create an object (function/class) from a suite and assign it to the name given after the keyword (def/class). Sure they do totally different things with the suite in creating the object, but in essence it's a name assignment.
In a way, ‘import’ and ‘break’ do the same thing, they trigger the compiler to compile a particular set of code bytes. Sure the code bytes do totally different things, but in essence it's a statement.
Less facetiously: You can blur your vision as much as you like to make ‘class’ and ‘def’ look similar, but that doesn't diminish the importance of the distinctions you're ignoring.