Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

add proper docstring to string_camelcase. refs #58

Daniel Granabf87fb845507
diff --git a/scrapy/trunk/scrapy/utils/misc.py b/scrapy/trunk/scrapy/utils/misc.py
index c6352fc3e..80a135e35 100644
--- a/scrapy/trunk/scrapy/utils/misc.py
+++ b/scrapy/trunk/scrapy/utils/misc.py
@@ -157,4 +157,12 @@ def items_to_csv(file, items, delimiter=';', headers=None):
CAMELCASE_INVALID_CHARS = re.compile('[^a-zA-Z]')
def string_camelcase(string):
+ """ Convert a word to it CamelCase version
+ >>> string_camelcase('lost-pound')
+ LostPound
+
+ >>> string_camelcase('missing_images')
+ MissingImages
+
+ """
return CAMELCASE_INVALID_CHARS.sub('', string.title())