[PyKDE] Eric: does not recognize function with non-simple
expression as default argument value
Parzival Herzog
parzp at shaw.ca
Sun Oct 3 19:24:20 BST 2004
Congratulations on the release of Eric 3.5.0! Perhaps the following
problem will be gone in 3.5.1! ;-))
I found that a function like:
def secs2radians(secs, _cvf=math.pi/(180.0*3600.0)):
return secs*_cvf
would not appear as a function listed under its source file in the project
tree view, but if I changed it to
def secs2radians(secs, _cvf=math.pi/180.0*3600.0):
return secs*_cvf
and saved the file, it would appear. So some parser in eric3 is quietly
rejecting the first syntax. Perhaps it uses a regular expression which does
not accept nested parentheses?
Also a definition with structured arguments such as:
def rotate((x,y,z),(a,b)):
return (x,y), (z,a,b)
is not recognized, while
def rotate(x,y,z,a,b):
return (x,y), (z,a,b)
is recognized.
--
Parzival Herzog
More information about the PyQt
mailing list