summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2003-01-08 16:33:40 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2003-01-08 16:33:40 (GMT)
commitb11ce9b96c724f9136d038847175a3a535417f56 (patch)
treea03c710e043f9f3566f2b4b80ff60cff17fce0cc /Lib
parent52941a8348ee12223963a2e35d5a43c60fc2e621 (diff)
downloadcpython-b11ce9b96c724f9136d038847175a3a535417f56.zip
cpython-b11ce9b96c724f9136d038847175a3a535417f56.tar.gz
cpython-b11ce9b96c724f9136d038847175a3a535417f56.tar.bz2
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.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/os.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/os.py b/Lib/os.py
index 721cb7e..4876539 100644
--- a/Lib/os.py
+++ b/Lib/os.py
@@ -416,11 +416,11 @@ else:
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 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):
try: