[PyKDE] Default function arguments,
KURL::cleanPath() -- a bindings bug?
jbublitz at nwinternet.com
Tue Mar 8 17:07:20 GMT 2005
On Tuesday 08 March 2005 06:54, Frans Englich wrote:
> I've stumbled over a behavior related to default function arguments which
> appears to be a bug, from what I can tell. See this snippet:
> >>> from kdecore import KURL
> >>> u = KURL( "http://www.example.org/test/../" )
> >>> u.cleanPath()
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> TypeError: insufficient number of arguments to KURL.cleanPath()
> >>> u.cleanPath(True)
> Apparently, cleanPath /requires/ a boolean argument, but the C++ function
> definition says:
> void cleanPath(bool cleanDirSeparator = true);
> What have I missed?
I've only checked KDE 3.0.0 and 3.3.0, but you're correct in both places; not
sure why that was missed.
I'll fix that in the next snapshot; you can fix it in your version in
kdecore/kurl.sip by changing the argument list to 'cleanPath' to
void cleanPath (bool = 1);
More information about the PyQt