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

Feature Request: dom child iteration via __iter__ #119

Closed
bannsec opened this issue Jan 19, 2020 · 2 comments · Fixed by #123
Closed

Feature Request: dom child iteration via __iter__ #119

bannsec opened this issue Jan 19, 2020 · 2 comments · Fixed by #123
Assignees

Comments

@bannsec
Copy link

bannsec commented Jan 19, 2020

Is your feature request related to a problem? Please describe

Not really a "problem". More that I find it not terribly intuitive to write dom._pfp__children.

Describe the solution you'd like

My natural response to iterating through a list of object is to use something like "for item in dom". In this case, my proposed solution would be to implement __iter__ as simply return self._pfp__children.__iter__().

Describe alternatives you've considered

Currently I just reference ._pfp__children when I want to see the listing.

Additional context

N/A

@d0c-s4vage
Copy link
Owner

This makes sense! Thanks for the suggestion

@d0c-s4vage
Copy link
Owner

Eventually I want to do something cleaner than prefixing all internal functions with _pfp__ too

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

Successfully merging a pull request may close this issue.

2 participants