Continuing to look into the subject of code smells, I ran across this:
"The situation where switch statements or type codes are needed should be handled by creating subclasses."
@ http://www.soberit.hut.fi/mmantyla/BadCodeSmellsTaxonomy.htm

Assuming I am correct that in Python, switch statements must be implemented as a series of if; elif; .. statements, how is it that this can be avoided by creating subclasses?
tks
alex

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to