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

jackjansen@users.sourceforge.net jackjansen@users.sourceforge.net
Thu, 02 Jan 2003 13:24:24 -0800


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

Modified Files:
      Tag: r23a1-branch
	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.63.2.1
diff -C2 -d -r1.63 -r1.63.2.1
*** os.py	9 Oct 2002 17:23:29 -0000	1.63
--- os.py	2 Jan 2003 21:24:22 -0000	1.63.2.1
***************
*** 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):