[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[pygame] glitch in makedocs.py



Hi,

just looking through the docs and wondered about this :

'>pygame.mixer.get_init() -> - query initialization for the mixer'

in the main index (and through link).

The /*DOC*/ string in "mixer.c" is :

'/*DOC*/    "pygame.mixer.get_init() -> (frequency,format,stereo)\n"'


Found this in "makedocs.py" :

def parsedocs(docs):
...
        else:
            obj = {'docs':['no documentation']}
#           name = d[1][:d[1].rfind('(')]    <---
            name = d[1][:d[1].find('(')]
            dot = name.rfind('.')

This is trying to find the opening bracket after
the function name, but in the above example, it is
finding the tuple bracket of the return value.

Could change the /*DOC*/ string, but searching
forward *seems* a better fix, yes?

cheers,
John.
PS nice doc. generator!


____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org