def calc_expected_status_length(status, short_url_length=23):
 status_length = 0
 for word in re.split(u'\\s', status):
  if is_url(word):
   status_length += short_url_length
  else:
   status_length += len(word)
 status_length += len(re.findall(u'\\s', status))
 return status_length

def calc_expected_status_length ( status , short_url_length = 23 ) : status_length = 0 for word in re . split ( u'\\s' , status ) : if is_url ( word ) : status_length += short_url_length else : status_length += len ( word ) status_length += len ( re . findall ( u'\\s' , status ) ) return status_length
calculates the length of a tweet .