summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS.txt5
-rw-r--r--bs4/__init__.py2
-rw-r--r--bs4/element.py8
-rw-r--r--setup.py2
4 files changed, 11 insertions, 6 deletions
diff --git a/NEWS.txt b/NEWS.txt
index 4134e91..1c32f28 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -1,3 +1,8 @@
+= 4.0.0b9 () =
+
+* Renamed Tag.nsprefix to Tag.prefix, for consistency with
+ NamespacedAttribute.
+
= 4.0.0b8 (20110224) =
* All tree builders now preserve namespace information in the
diff --git a/bs4/__init__.py b/bs4/__init__.py
index 9b5c155..cbd0fd6 100644
--- a/bs4/__init__.py
+++ b/bs4/__init__.py
@@ -17,7 +17,7 @@ http://www.crummy.com/software/BeautifulSoup/bs4/doc/
"""
__author__ = "Leonard Richardson (leonardr@segfault.org)"
-__version__ = "4.0.0b8"
+__version__ = "4.0.0b9"
__copyright__ = "Copyright (c) 2004-2012 Leonard Richardson"
__license__ = "MIT"
diff --git a/bs4/element.py b/bs4/element.py
index efc6ec7..cdc9e36 100644
--- a/bs4/element.py
+++ b/bs4/element.py
@@ -521,7 +521,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,
- nsprefix=None, attrs=None, parent=None, previous=None):
+ prefix=None, attrs=None, parent=None, previous=None):
"Basic constructor."
if parser is None:
@@ -534,7 +534,7 @@ class Tag(PageElement):
raise ValueError("No value provided for new tag's name.")
self.name = name
self.namespace = namespace
- self.nsprefix = nsprefix
+ self.prefix = prefix
if attrs is None:
attrs = {}
else:
@@ -808,8 +808,8 @@ class Tag(PageElement):
closeTag = '</%s>' % self.name
prefix = ''
- if self.nsprefix:
- prefix = self.nsprefix + ":"
+ if self.prefix:
+ prefix = self.prefix + ":"
pretty_print = (indent_level is not None)
if pretty_print:
diff --git a/setup.py b/setup.py
index 878d06c..21fad87 100644
--- a/setup.py
+++ b/setup.py
@@ -7,7 +7,7 @@ except ImportError:
from distutils.command.build_py import build_py
setup(name="beautifulsoup4",
- version = "4.0.0b8",
+ version = "4.0.0b9",
author="Leonard Richardson",
author_email='leonardr@segfault.org',
url="http://www.crummy.com/software/BeautifulSoup/bs4/",