[Python-checkins] CVS: python/dist/src/Lib __future__.py,1.10,1.11

Guido van Rossum gvanrossum@users.sourceforge.net
Sat, 18 Aug 2001 22:29:27 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv29136

Modified Files:
	__future__.py 
Log Message:
Avoid total dependency on the new module.  This addresses the problem
reported by Greg Ball on python-dev.


Index: __future__.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/__future__.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** __future__.py	2001/08/18 20:18:49	1.10
--- __future__.py	2001/08/19 05:29:25	1.11
***************
*** 56,60 ****
  __all__ = ["all_feature_names"] + all_feature_names
  
! import new as _new  # for CO_xxx symbols
  
  class _Feature:
--- 56,66 ----
  __all__ = ["all_feature_names"] + all_feature_names
  
! try:
!     import new as _new  # for CO_xxx symbols
! except ImportError: # May happen during build
!     class _new:
!         CO_NESTED = 0x0010
!         CO_GENERATOR_ALLOWED = 0x1000
!         CO_FUTURE_DIVISION = 0x2000
  
  class _Feature: