]>
git.proxmox.com Git - mirror_edk2.git/blob - AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_reduce.py
1 # Copyright 2008 Armin Ronacher.
2 # Licensed to PSF under a Contributor Agreement.
6 Makes sure reduce() is imported from the functools module if reduce is
10 from lib2to3
import fixer_base
11 from lib2to3
.fixer_util
import touch_import
15 class FixReduce(fixer_base
.BaseFix
):
24 (not(argument<any '=' any>) any ','
25 not(argument<any '=' any>) any) |
26 (not(argument<any '=' any>) any ','
27 not(argument<any '=' any>) any ','
28 not(argument<any '=' any>) any)
34 def transform(self
, node
, results
):
35 touch_import(u
'functools', u
'reduce', node
)