I
iMath
Pass and return
Are these two functions the same ?
def test():
return
def test():
pass
Are these two functions the same ?
def test():
return
def test():
pass
Pass and return
Are these two functions the same ?
def test():
return
def test():
pass
Pass and return
Are these two functions the same ?
def test():
return
def test():
pass
Pass and return
Are these two functions the same ?
def test():
return
def test():
pass
Pass and return
Are these two functions the same ?
def test():
return
def test():
pass
I would say it is *an* idiomatic way to define a no-op function.
Another idiomatic way is to use a doc-string as the only body,
that way you can also explain why you feel the need for an empty
function.
Pass and return
Are these two functions the same ?
def test():
return
def test():
pass
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.