What exactly is "pass"? What should it be?

John Ladasky ladasky at my-deja.com
Fri Nov 18 00:07:23 EST 2011


On Thursday, November 17, 2011 8:34:22 PM UTC-8, Dennis Lee Bieber wrote:
> On Thu, 17 Nov 2011 18:18:11 -0800 (PST), John Ladasky
> <lad... at my-deja.com> declaimed the following in
> gmane.comp.python.general:
> > def _pass(*args):
> >     pass
> >
> 	This is the equivalent of
> 
> def _pass(*args):
> 	return None
> 
> (functions with no explicit return statement implicitly return None)

OK, that works for me, and now I understand.

One of my questions was: would there be any merit to having the Python "pass" token itself defined exactly as _pass() is defined above?




More information about the Python-list mailing list