Browse Source

Code cleaning

Yann Weber 8 years ago
parent
commit
39791c26a2
2 changed files with 2 additions and 29 deletions
  1. 1
    1
      AUTHORS
  2. 1
    28
      pybfenc.py

+ 1
- 1
AUTHORS View File

@@ -1 +1 @@
1
-Zered <zered@member.fsf.org>
1
+Yann Weber <yannweb@member.fsf.org>

+ 1
- 28
pybfenc.py View File

@@ -1,7 +1,7 @@
1 1
 #!/usr/bin/python
2 2
 
3 3
 #
4
-#	Copyright 2014 Zered <zered@member.fsf.org>
4
+#	Copyright 2014 Yann Weber <yannweb@member.fsf.org>
5 5
 #
6 6
 #	bfstr is free software: you can redistribute it and/or modify
7 7
 #	it under the terms of the GNU General Public License as published by
@@ -62,16 +62,6 @@ class BrainfuckGenerator(object):
62 62
 				plus = False
63 63
 				delta*=-1
64 64
 				
65
-			"""
66
-			if delta > 1:
67
-				res+=nb2bf(delta,plus)
68
-			elif delta == 1:
69
-				if plus:
70
-					res+='+'
71
-				else:
72
-					res+='-'
73
-			"""
74
-			
75 65
 			if delta > OPTIDELTAMIN:
76 66
 				res+=nb2bf(delta,plus)
77 67
 			elif delta > 0:
@@ -107,15 +97,6 @@ def nb2bf(delta, plus):
107 97
 	primesP1 = primeFact(delta+1)
108 98
 	primesM1 = primeFact(delta-1)
109 99
 	
110
-	"""
111
-	#print "delta",delta
112
-	primes = optiPrime(primeFact(delta))
113
-	#we will test if when adding or substracting 1 is not shorter
114
-	primesP1 = optiPrime(primeFact(delta+1))
115
-	primesM1 = optiPrime(primeFact(delta-1))
116
-	"""
117
-	
118
-	
119 100
 	p1 = False
120 101
 	m1 = False
121 102
 	
@@ -188,14 +169,6 @@ def primeFact(n):
188 169
 	nc = n
189 170
 	
190 171
 	res = []
191
-	"""
192
-	for i in PRIMES:
193
-		if nc == 0:
194
-			return res
195
-		while nc%i == 0:
196
-			res.append(i)
197
-			nc/=i
198
-	"""
199 172
 	for i in PRIMES:
200 173
 		if nc == 0:
201 174
 			return res

Loading…
Cancel
Save