Feature Request: PageElement.extend() and family
Bug #1514970 reported by
Daniel Grace
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Beautiful Soup |
Fix Released
|
Wishlist
|
Unassigned |
Bug Description
I'm finding myself often writing code like:
for found in soup.find_all(...):
tag.
It'd be handy if BeautifulSoup had an extend() method (that would be the analog to list.extend) that inserted every element from an iterable as a shortcut.
Likewise, it might be handy if insert_
Related branches
lp:~facelessuser/beautifulsoup/multi-append-insert
- Leonard Richardson: Approve
-
Diff: 143 lines (+71/-33)2 files modifiedbs4/element.py (+43/-33)
bs4/tests/test_tree.py (+28/-0)
Changed in beautifulsoup: | |
status: | New → Confirmed |
tags: | added: feature |
Changed in beautifulsoup: | |
importance: | Undecided → Wishlist |
To post a comment you must log in.
Revision 485 adds this feature. It will be in the 4.7.0 release.