Original Post
For the last few weeks, I'm working on a 2D Platform/Action/RPG game in Python/Pygame/Opengl. Since it's getting big, and although I favour dynamic vs static typing, I figured that I need some kind of reminder about the types of the arguments in most functions. So I decided to document most, if not all, of them in a fashion like this: "3*float" means "a sequence(tuple or list) of 3 floats". Also, if the argument can be of any type, I just use "object" for its type. So I was wondering what other Pythonistas here think about this. How would you feel about a project that was written this way? Good,bad,annoying,redudant,useful? Any comments?
def textured_rect(rect,tex_id,color):
"(pygame.Rect,int,3*float)->None"
class ImageManager:
...
def img_and_id(self,name):
"(self,string)->(pygame.Surface,int)"
return (self.images[name],self.tex_ids[name])
...