I was wondering what is the convention for return default types for python functions for e.g the below should Official
return False
or None
, should Name
return ''
or None
by default. What does Python recommend?
class Foo(object):
def Official(self):
"""
Flag to state if something is official e.g False / True
:rtype: bool
"""
return None
def Name(self):
"""
:rtype: str
"""
return None
What does Python recommend?
begs for an answer ofdid you google this?
this doesn't even look like production code, please read the help section about On-Topic Questions specificallyIs it actual code from a project rather than pseudo-code or example code?
– Malachi May 25 at 4:11