mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-23 02:16:01 +01:00
More cleanup for #1865
This commit is contained in:
parent
aa88cd86a5
commit
283e7953cb
@ -582,7 +582,13 @@ def h_fun(fun):
|
||||
except AttributeError:
|
||||
if isinstance(fun, functools.partial):
|
||||
code = list(fun.args)
|
||||
code.extend(fun.keywords.items())
|
||||
# The method items() provides a sequence of tuples where the first element
|
||||
# represents an optional argument of the partial function application
|
||||
#
|
||||
# The sorting result outcome will be consistent because:
|
||||
# 1. tuples are compared in order of their elements
|
||||
# 2. optional argument namess are unique
|
||||
code.extend(sorted(fun.keywords.items()))
|
||||
code.append(h_fun(fun.func))
|
||||
fun.code = h_list(code)
|
||||
return fun.code
|
||||
|
Loading…
Reference in New Issue
Block a user