class module:
    mod_name = "unnamed_module";
    mod_id = -1;
    mod_rect = None;
    mod_surface = None;
    mod_attribs = [];

    def __init__(self, _id):
        print("Initializing generic module (This shouldn't happen...)");



from pygame import Rect

class module:
    mod_name = "unnamed_module"
    mod_id = -1
    mod_size = Rect(0,0,0,0)

    def __init__(self, _id = -1):
        print("Initializing generic module (This shouldn't happen...)")

    def draw(self, surf):
        "Takes a surface object and blits its data onto it"
        print("Draw call of generic module (This shouldn't happen...)")

    def update(self):
        "Update this module's internal state (do things like time updates, get weather, etc."
        print("Update call of generic module (This shouldn't happen...)")

def new_module(_id = -1):
    return module(_id)

test_module = new_module()

Change module class to use Rect for size and take a surface as an argument to draw()
Change module class to use Rect for size and take a surface as an argument to draw()

+ from pygame import Rect
+ 
  class module:
-     mod_name = "unnamed_module";
+     mod_name = "unnamed_module"
-     mod_id = -1;
+     mod_id = -1
+     mod_size = Rect(0,0,0,0)
-     mod_rect = None;
-     mod_surface = None;
-     mod_attribs = [];
  
-     def __init__(self, _id):
+     def __init__(self, _id = -1):
-         print("Initializing generic module (This shouldn't happen...)");
+         print("Initializing generic module (This shouldn't happen...)")
  
+     def draw(self, surf):
+         "Takes a surface object and blits its data onto it"
+         print("Draw call of generic module (This shouldn't happen...)")
  
+     def update(self):
+         "Update this module's internal state (do things like time updates, get weather, etc."
+         print("Update call of generic module (This shouldn't happen...)")
  
+ def new_module(_id = -1):
+     return module(_id)
+ 
+ test_module = new_module()
+ 
Change module class to use Rect for size and take a surface as an argument to draw()
## Code Before:
class module:
    mod_name = "unnamed_module";
    mod_id = -1;
    mod_rect = None;
    mod_surface = None;
    mod_attribs = [];

    def __init__(self, _id):
        print("Initializing generic module (This shouldn't happen...)");



## Instruction:
Change module class to use Rect for size and take a surface as an argument to draw()
## Code After:
from pygame import Rect

class module:
    mod_name = "unnamed_module"
    mod_id = -1
    mod_size = Rect(0,0,0,0)

    def __init__(self, _id = -1):
        print("Initializing generic module (This shouldn't happen...)")

    def draw(self, surf):
        "Takes a surface object and blits its data onto it"
        print("Draw call of generic module (This shouldn't happen...)")

    def update(self):
        "Update this module's internal state (do things like time updates, get weather, etc."
        print("Update call of generic module (This shouldn't happen...)")

def new_module(_id = -1):
    return module(_id)

test_module = new_module()
