Boost logo

Boost-Commit :

From: daniel_at_[hidden]
Date: 2007-10-11 16:48:22


Author: danielw
Date: 2007-10-11 16:48:22 EDT (Thu, 11 Oct 2007)
New Revision: 39940
URL: http://svn.boost.org/trac/boost/changeset/39940

Log:
Don't use [] as default arguments in make().

Text files modified:
   branches/build/python_port/python/boost/build/tools/make.py | 8 +++++---
   1 files changed, 5 insertions(+), 3 deletions(-)

Modified: branches/build/python_port/python/boost/build/tools/make.py
==============================================================================
--- branches/build/python_port/python/boost/build/tools/make.py (original)
+++ branches/build/python_port/python/boost/build/tools/make.py 2007-10-11 16:48:22 EDT (Thu, 11 Oct 2007)
@@ -30,11 +30,14 @@
 
 # FIXME: should not have 'self' at all.
 def make (self, target_name, sources, generating_rule,
- requirements=[], usage_requirements=[]):
+ requirements=None, usage_requirements=None):
 
     target_name = target_name[0]
     generating_rule = generating_rule[0]
 
+ if not requirements:
+ requirements = []
+
     requirements.append("<action>%s" % generating_rule)
     m = get_manager()
     targets = m.targets()
@@ -47,8 +50,7 @@
         targets.main_target_sources(sources, target_name),
         targets.main_target_requirements(requirements, project),
         targets.main_target_default_build([], project),
- targets.main_target_usage_requirements(usage_requirements, project)))
+ targets.main_target_usage_requirements(usage_requirements or [], project)))
 
 get_manager().projects().add_rule("make", make)
 
-


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk