New submission from Mary Stern :
I was getting this error (while running my unit tests):
Exception exceptions.AttributeError: "'NoneType' object has no attribute
'error'" in > ignored
which I tracked down to the os module being set to None (yes really!) in
P
Changes by Mary Stern :
--
title: subprocess.POpen.__del__() AttribuetError (os module == None!) ->
subprocess.POpen.__del__() AttributeError (os module == None!)
___
Python tracker
<http://bugs.python.org/iss
New submission from Mary Stern :
os.environ.get('ENV_VAR, 'mydefault')
returns '' rather than 'mydefault' if not set.
It would be nice if this standard dict-style behavior was supported.
--
messages: 81963
nosy: marystern
severity: normal
status: o
New submission from Mary Stern :
Using print in python 3 I would like to simple "replace" print with
pprint.pprint. However pprint cannot be called with no arguments, so
this cannot currently be done (the error is "TypeError: pprint() takes
at least 1 positional argument (0 give
Mary Stern added the comment:
Sorry: you also need to print out the args! :) .. like this:
def pprint(object='\n', *args, stream=None, indent=1, width=80, depth=None):
"""Pretty-print a Python object to a stream [default is sys.stdout]."""
printe