How to designate unreachable python code -


What is the python way of specifying an unchangeable code in Python:

  gender = readFromDB (...) # 'M' or 'F' if gender == 'm': greeting = 'mister' alif gender == 'f': greeting = 'ms' else: # what should this line say ? Increase ValueArror ('illegal gender% r'% gender)  

  code> 

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -