Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#232 Incorrect default function parameter value appears in HTML

v3.0
closed-fixed
nobody
None
5
2008-01-29
2007-11-19
Harold Mills
No

For the following Python file that loads a Windows DLL:

from ctypes import WinDLL

# Load a DLL.
try:
_lib = WinDLL('vbscript')
except WindowsError:
_lib = None

def function(x = None):
pass

when I run epydoc 3.0 beta 1 with the command:

python "C:\Program Files\Python24\Scripts\epydoc.py" -o doc --docformat reStructuredText EpydocProblem.py

the generated HTML documentation shows a value of something like "<WinDLL 'vbscript', handle 70de0000 at 1439030>" for the function parameter x rather than "None".

A simple workaround is to load the DLL within a function, like:

from ctypes import WinDLL

def loadDll():

try:
return WinDLL('vbscript')
except WindowsError:
return None

_lib = loadDll()

def function(x = None):
pass

Discussion

  • Edward Loper
    Edward Loper
    2008-01-29

    Logged In: YES
    user_id=195958
    Originator: NO

    This should be fixed in the latest subversion release.

     
  • Edward Loper
    Edward Loper
    2008-01-29

    • status: open --> closed-fixed