Commit b4a35249 authored by Evan Simpson's avatar Evan Simpson

Fixed default parameter

parent 5fdc5ef2
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
This provides support for simulating function signatures This provides support for simulating function signatures
""" """
__version__='$Revision: 1.3 $'[11:-2] __version__='$Revision: 1.4 $'[11:-2]
class FuncCode: class FuncCode:
...@@ -104,9 +104,9 @@ class FuncCode: ...@@ -104,9 +104,9 @@ class FuncCode:
# This is meant to be imported directly into a class. # This is meant to be imported directly into a class.
def _setFuncSignature(self, defaults=None, varnames=(), argcount=0): def _setFuncSignature(self, defaults=None, varnames=(), argcount=-1):
# Simplify calls. # Simplify calls.
if argcount == 0 and varnames: if argcount < 0 and varnames:
argcount = len(varnames) argcount = len(varnames)
# Generate a change only if we have to. # Generate a change only if we have to.
if self.func_defaults != defaults: if self.func_defaults != defaults:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment