Change your method: def ask_number(self,question,low,high): response=None while response not in range(low,high): response=int(input(question))
change self to class: This way you can call the method directly from Hand. @classmethod def ask_number(class,question,low,high): response=None while response not in range(low,high): response=int(input(question)) -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b9712dd0-03b2-4623-ae76-4f81055bd83b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.