Updates documentation on dynamic item classes. #1018

Merged
merged 1 commit into from Jan 19, 2015

Projects

None yet

2 participants

@barraponto
Contributor

Fixes #398
Used dict comprehension for more pythonic code.

@nramirezuy nramirezuy commented on the diff Jan 19, 2015
docs/topics/practices.rst
- return type(class_name, (DictItem,), field_dict)
+ return type(class_name, (DictItem,), {'fields': fields})
@nramirezuy
nramirezuy Jan 19, 2015 Member

return type(class_name, (DictItem,), {'fields': fields}) this is wrong; should be return type(class_name, (DictItem,), fields)

@barraponto
barraponto Jan 19, 2015 Contributor

Oh, it is needed at least since 0.22.2 #398 (comment)

@nramirezuy
nramirezuy Jan 19, 2015 Member

You are right, I didn't noticed the type.

@nramirezuy nramirezuy merged commit 2183984 into scrapy:master Jan 19, 2015

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
@barraponto
Contributor

This should be backported to 0.24 too, since the docs are misleading there...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment