import random
class die_bag():#Class for rolling die/dices
	
	def __init__(self):
		self.data = []
	
	
	def die(self, x, y = 1):#Roll a die and returns result
		result = []
		for i in range(y):
			result.append(random.randint(1, x))
		return result
		print result 

	
	

	def take_input_die(self):#Take input from user 
	
		eyes = int(raw_input('Number of eyes? '))
		times = int(raw_input('Number of times? '))
		
		#Call die
		dieRoll = die_bag.die(self, eyes, times)
		print dieRoll

d_class = die_bag()#Create a instance of die_bag

die_bag.take_input_die(d_class)#Call take_input_die

#Why does this not work?
die_bag.die(d_class, 20, 1)#Call die with parameters
@@ -11,106 +11,64 @@
 dom%0A
-class die_bag():#Class for rolling die/dices%0A%09%0A%09def __init__(self):%0A%09%09self.data = %5B%5D%0A%09%0A%09%0A%09
+%0A%22%22%22In this module, die or dices are rolled%22%22%22%0A%0A
 def die(
 self
@@ -63,22 +63,16 @@
 def die(
-self, 
 x, y = 1
@@ -77,543 +77,315 @@
  1):
-#Roll a die and returns result%0A%09%09result = %5B%5D%0A%09%09for i in range(y):%0A%09%09%09result.append(random.randint(1, x))%0A%09%09return result%0A%09%09print result %0A%0A%09%0A%09%0A%0A%09def take_input_die(self):#Take input from user %0A%09%0A%09%09eyes = int(raw_input('Number of eyes? '))%0A%09%09times = int(raw_input('Number of times? '))%0A%09%09%0A%09%09#Call die%0A%09%09dieRoll = die_bag.die(self, eyes, times)%0A%09%09print dieRoll%0A%0Ad_class = die_bag()#Create a instance of die_bag%0A%0Adie_bag.take_input_die(d_class)#Call take_input_die%0A%0A#Why does this not work?%0Adie_bag.die(d_class, 20, 1)#Call die with parameters
+%0A    %22%22%22Function for rolling a die or several dice,%0A    returns an array with results of dice rolls.%0A    Parameter x is number of eyes on a die.%0A    Parameter y = 1 is the times to a die is rolled.%0A    %22%22%22%0A    %0A    result = %5B%5D%0A    for i in range(y):%0A        result.append(random.randint(1, x))%0A    return result

Remove test functions and, clean code in preperation for posting a pull request