Skip to content

Commit

Permalink
utilizando o metodo capitalize buit-in do objeto str
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiobatalha committed Jun 9, 2014
1 parent 04db6ed commit cd4bf31
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions scielomanager/tools/import_data/journalimport.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@

def capitalize(text):

def capitalize_word(word):
return word[0].upper()+word[1:]

text = ' '.join([capitalize_word(i) for i in str(text).lower().split(' ')])
text = ' '.join([i.capitalize() for i in str(text).lower().split(' ')])

return text

Expand Down

0 comments on commit cd4bf31

Please sign in to comment.