This will be really funny...
Given following python
codes:
def getBinary(binaryInput, kSize, beginBit):
if int(binaryInput[beginBit + kSize-1])=
The code is missing in the else
part:
def getBinary(binaryInput, kSize, beginBit):
if int(binaryInput[beginBit + kSize-1])==1:
print 'entered!!!'
shortE = binaryInput[beginBit:kSize+beginBit]
print 'shortE is now: ', shortE
print 'kSize is now: ', kSize
return (shortE,kSize)
else :
print 'else entered...'
kSize -=1
return getBinary(binaryInput, kSize, beginBit)
# ^^^^
When a function ends without executing a return
statement, it returns None
. Instead of
getBinary(binaryInput, kSize, beginBit)
you mean
return getBinary(binaryInput, kSize, beginBit)