[Python-checkins] python/dist/src/Lib os.py,1.63,1.64

jackjansen@users.sourceforge.net jackjansen@users.sourceforge.net
Wed, 08 Jan 2003 08:33:44 -0800


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

Modified Files:
	os.py 
Log Message:
Always define getenv(), as suggested by Guido. This means that os.getenv() is also defined for MacPython-OS9 (even though it doesn't actually do anything useful), and it shouldn't hurt on other platforms.


Index: os.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/os.py,v
retrieving revision 1.63
retrieving revision 1.64
diff -C2 -d -r1.63 -r1.64
*** os.py	9 Oct 2002 17:23:29 -0000	1.63
--- os.py	8 Jan 2003 16:33:40 -0000	1.64
***************
*** 417,425 ****
      environ = _Environ(environ)
  
!     def getenv(key, default=None):
!         """Get an environment variable, return None if it doesn't exist.
!         The optional second argument can specify an alternate default."""
!         return environ.get(key, default)
!     __all__.append("getenv")
  
  def _exists(name):
--- 417,425 ----
      environ = _Environ(environ)
  
! def getenv(key, default=None):
! 	"""Get an environment variable, return None if it doesn't exist.
! 	The optional second argument can specify an alternate default."""
! 	return environ.get(key, default)
! __all__.append("getenv")
  
  def _exists(name):