from future import pass_function
rosuav at gmail.com
Thu Jul 26 11:42:11 CEST 2012
On Thu, Jul 26, 2012 at 7:16 PM, Devin Jeanpierre
<jeanpierreda at gmail.com> wrote:
> On Thu, Jul 26, 2012 at 1:20 AM, Michael Hrivnak <mhrivnak at hrivnak.org> wrote:
>> If we want pass(), then why not break() and continue()? And also
>> def() and class()? for(), while(), if(), with(), we can make them all
>> callable objects!
> No, you actually can't.
> You omit the one control flow statement that could actually be turned
> into a function, raise. None of the rest could in Python (except
> class), and one of the rest couldn't in any language (def).
Well, if/while/for could be functions. So could with, probably. Now,
def would be a little tricky...
More information about the Python-list