home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / lib / python2.6 / lib2to3 / fixes / fix_future.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2009-04-20  |  910 b   |  21 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. '''Remove __future__ imports
  5.  
  6. from __future__ import foo is replaced with an empty line.
  7. '''
  8. from  import fixer_base
  9. from fixer_util import BlankLine
  10.  
  11. class FixFuture(fixer_base.BaseFix):
  12.     PATTERN = 'import_from< \'from\' module_name="__future__" \'import\' any >'
  13.     run_order = 10
  14.     
  15.     def transform(self, node, results):
  16.         new = BlankLine()
  17.         new.prefix = node.get_prefix()
  18.         return new
  19.  
  20.  
  21.