Closed sibelius closed 8 years ago
hmm... I think this improvements is for application level - this is special behavior for concrete application needs.
Pomp in some points like paste - meta framework for building frameworks. Another words - not all pomp users would want this feature.
But it is my mistake. I am not define Item
interface.
The main goal of Item
is the glue of crawler and pipelines.
For example in application developer must implement Item
interface to be sure what all pipelines will works whit this item.
Now Item
implement OrderedDict
interface
See cf6c4840e0f94085a41f6f6182a01826d13e3ec
pomp starts 0.2.0 version, many things was refactored. this PR is not actual, sorry...
Now we can use the following syntax
class MyItem(Item): f1 = Field() f2 = Field()
mi = MyItem('field1', 'field2') mi.f1 == 'field1' m.f2 == 'field2' print(m) == 'MyItem(f1=field1,f2=field2)'