Returning none

Paul Prescod paul at prescod.net
Thu Aug 26 10:33:40 EDT 1999


I think it would be more pythonish if this would return a runtime (or
even compiletime) error:

def foo():
	a=5

b=foo()

It shouldn't just return None. That's a source of errors.

This is obviously an incompatible change so I propose it for Python 2.

 Paul Prescod




More information about the Python-list mailing list