Mercurial > cpython-lru_cache-weakref
view Lib/lib2to3/fixes/fix_long.py @ 54294:dba767bc3155 legacy-trunk
remove mention of old ctypes version
| author | Benjamin Peterson <benjamin@python.org> |
|---|---|
| date | Sat, 23 May 2009 20:59:09 +0000 |
| parents | 119e4323400d |
| children | 7700408f65fc |
line wrap: on
line source
# Copyright 2006 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Fixer that turns 'long' into 'int' everywhere. """ # Local imports from .. import fixer_base from ..fixer_util import Name, Number, is_probably_builtin class FixLong(fixer_base.BaseFix): PATTERN = "'long'" static_int = Name(u"int") def transform(self, node, results): if is_probably_builtin(node): new = self.static_int.clone() new.set_prefix(node.get_prefix()) return new
