diff options
| author | Leonard Richardson <leonard.richardson@canonical.com> | 2012-04-26 12:55:59 -0400 |
|---|---|---|
| committer | Leonard Richardson <leonard.richardson@canonical.com> | 2012-04-26 12:55:59 -0400 |
| commit | d1261fb0a2df9929658dfdc9fe5880974e287d21 (patch) | |
| tree | 39f1ffc1a9efe21e0f45386a96cbbb495301559d /bs4/element.py | |
| parent | 12f37383078c18a37968a8446961eff7a4e77e75 (diff) | |
Renamed replace_with_children() to the jQuery name, unwrap().
Diffstat (limited to 'bs4/element.py')
| -rw-r--r-- | bs4/element.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bs4/element.py b/bs4/element.py index c1ad992..eb7e8aa 100644 --- a/bs4/element.py +++ b/bs4/element.py @@ -150,14 +150,15 @@ class PageElement(object): return self replaceWith = replace_with # BS3 - def replace_with_children(self): + def unwrap(self): my_parent = self.parent my_index = self.parent.index(self) self.extract() for child in reversed(self.contents[:]): my_parent.insert(my_index, child) return self - replaceWithChildren = replace_with_children # BS3 + replace_with_children = unwrap + replaceWithChildren = unwrap # BS3 def extract(self): """Destructively rips this element out of the tree.""" |
