diff options
author | Leonard Richardson <leonard.richardson@canonical.com> | 2012-02-21 12:19:56 -0500 |
---|---|---|
committer | Leonard Richardson <leonard.richardson@canonical.com> | 2012-02-21 12:19:56 -0500 |
commit | 2ccae07967bb15f6bad6ba262411ac47bcbb98e7 (patch) | |
tree | 210416dd1fec859500ff4e23e6fced41f1b5e4f9 /bs4/element.py | |
parent | fc625b23c7e17b55aee18c8d449c14c13702b937 (diff) |
Added nsprefix argument to the tag class.
Diffstat (limited to 'bs4/element.py')
-rw-r--r-- | bs4/element.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bs4/element.py b/bs4/element.py index 653bb05..73f225e 100644 --- a/bs4/element.py +++ b/bs4/element.py @@ -522,7 +522,7 @@ class Tag(PageElement): """Represents a found HTML tag with its attributes and contents.""" def __init__(self, parser=None, builder=None, name=None, namespace=None, - attrs=None, parent=None, previous=None): + nsprefix=None, attrs=None, parent=None, previous=None): "Basic constructor." if parser is None: @@ -535,6 +535,7 @@ class Tag(PageElement): raise ValueError("No value provided for new tag's name.") self.name = name self.namespace = namespace + self.nsprefix = nsprefix if attrs is None: attrs = {} else: |