Boost logo

Boost-Commit :

From: daniel_at_[hidden]
Date: 2007-10-14 07:21:05


Author: danielw
Date: 2007-10-14 07:21:04 EDT (Sun, 14 Oct 2007)
New Revision: 40010
URL: http://svn.boost.org/trac/boost/changeset/40010

Log:
Don't use [] for default arguments.

Text files modified:
   branches/build/python_port/python/boost/build/build/alias.py | 10 +++++++---
   1 files changed, 7 insertions(+), 3 deletions(-)

Modified: branches/build/python_port/python/boost/build/build/alias.py
==============================================================================
--- branches/build/python_port/python/boost/build/build/alias.py (original)
+++ branches/build/python_port/python/boost/build/build/alias.py 2007-10-14 07:21:04 EDT (Sun, 14 Oct 2007)
@@ -42,15 +42,19 @@
         # look like 100% alias.
         return base.add(subvariant.sources_usage_requirements())
 
-def alias(name, sources, requirements=[], default_build=[], usage_requirements=[]):
+def alias(name, sources, requirements=None, default_build=None, usage_requirements=None):
     project = get_manager().projects().current()
     targets = get_manager().targets()
+
+ if default_build:
+ default_build = default_build[0]
+
     targets.main_target_alternative(AliasTarget(
         name[0], project,
         targets.main_target_sources(sources, name),
- targets.main_target_requirements(requirements, project),
+ targets.main_target_requirements(requirements or [], project),
         targets.main_target_default_build(default_build, project),
- targets.main_target_usage_requirements(usage_requirements, project)))
+ targets.main_target_usage_requirements(usage_requirements or [], project)))
 
 # Declares the 'alias' target. It will build sources, and return them unaltered.
 get_manager().projects().add_rule("alias", alias)


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