Feature Request: PageElement.extend() and family

Bug #1514970 reported by Daniel Grace
6
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.append(found)

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_after/insert_before could take a variable number of arguments and would insert each argument in order.

Tags: feature

Related branches

Changed in beautifulsoup:
status: New → Confirmed
tags: added: feature
Changed in beautifulsoup:
importance: Undecided → Wishlist
Revision history for this message
Leonard Richardson (leonardr) wrote :

Revision 485 adds this feature. It will be in the 4.7.0 release.

Changed in beautifulsoup:
status: Confirmed → Fix Committed
Revision history for this message
Leonard Richardson (leonardr) wrote :

In 4.7.0 release.

Changed in beautifulsoup:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.