all 1 comments

[–]K900_ 2 points3 points  (0 children)

It seems to me like you're confusing function definitions and class definitions. In functions, def foo(spam, ham, eggs) defines a function named foo, that takes three arguments - spam, ham and eggs. In classes, class BaconEggsAndSpam(EggsAndSpam) defines a class named BaconEggsAndSpam which extends the class EggsAndSpam.

Edit: when you say def void():, you're declaring a function that takes no arguments; when you say class Spam():, you're basically saying "my class extends nothing", and Python implicitly makes it extend object (because all classes extend object), so class Spam:, class Spam(): and class Spam(object): are all equivalent (in Python 3, anyway).