# HG changeset patch # User paulb@localhost.localdomain # Date 1185649724 -7200 # Node ID 589fc634882e354da12861af36d3d2abe6fc8bec # Parent fa0da921e79b735a350c66ed301b4b3baf36d794 Reprocess star/dstar defaults when no annotations are provided. Fixed the now erroneous reassignment of the star/dstar annotations. diff -r fa0da921e79b -r 589fc634882e simplify/annotate.py --- a/simplify/annotate.py Sat Jul 28 01:58:06 2007 +0200 +++ b/simplify/annotate.py Sat Jul 28 21:08:44 2007 +0200 @@ -1208,8 +1208,8 @@ raise AnnotationMessage, "Invocation provides unwanted *args." elif subprogram.star is not None: param, default = subprogram.star - if not hasattr(default, "types"): - subprogram.star = param, self.dispatch(default) # NOTE: Review reprocessing. + if not hasattr(default, "types") or not default.types: + self.dispatch(default) # NOTE: Review reprocessing. items.append((param, default.types)) if dstar_types is not None: @@ -1220,8 +1220,8 @@ raise AnnotationMessage, "Invocation provides unwanted **args." elif subprogram.dstar is not None: param, default = subprogram.dstar - if not hasattr(default, "types"): - subprogram.dstar = param, self.dispatch(default) # NOTE: Review reprocessing. + if not hasattr(default, "types") or not default.types: + self.dispatch(default) # NOTE: Review reprocessing. items.append((param, default.types)) # Record the parameter types.