Calling Stock() directly without providing the name of the module will result in the following error: NameError: name 'Stock' is not defined This fixes the bug in the example code.