Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert SitemapNewsStory to dict #18

Open
J535D165 opened this issue Aug 6, 2019 · 0 comments
Open

Convert SitemapNewsStory to dict #18

J535D165 opened this issue Aug 6, 2019 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@J535D165
Copy link

J535D165 commented Aug 6, 2019

usp.objects.page.SitemapNewsStory has no attribute __dict__ because of the usage of slots. Therefore, vars() and __dict__() don't work. It would be nice to have an option to parse the attributes to a dict.

In [39]: a[-1].__dict__()                                                                                                                                                                                   
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-39-ab06281650cf> in <module>
----> 1 a[-1].__dict__()

AttributeError: 'SitemapPage' object has no attribute '__dict__'

In [40]: vars(a[-1])                                                                                                                                                                                        
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-40-ada32e179a17> in <module>
----> 1 vars(a[-1])

TypeError: vars() argument must have __dict__ attribute

Thanks for this lib. Works well.

@pypt pypt added the enhancement New feature or request label Aug 6, 2019
@freddyheppell freddyheppell added this to the v1.0 milestone Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants