summaryrefslogtreecommitdiff
path: root/bs4
diff options
context:
space:
mode:
authorLeonard Richardson <leonardr@segfault.org>2013-05-07 08:40:35 -0400
committerLeonard Richardson <leonardr@segfault.org>2013-05-07 08:40:35 -0400
commit5b3860ec348b66976de64b5be407704041102869 (patch)
treee981cbdd77dce9a596dc0a5e1555de47c29923d1 /bs4
parente31151091c3dd44d0f39ba234df261f362199ae5 (diff)
Aliased the BeautifulSoup class to the easier-to-type "_s" and "_soup".
Diffstat (limited to 'bs4')
-rw-r--r--bs4/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/bs4/__init__.py b/bs4/__init__.py
index fe2656b..88177d6 100644
--- a/bs4/__init__.py
+++ b/bs4/__init__.py
@@ -335,6 +335,10 @@ class BeautifulSoup(Tag):
return prefix + super(BeautifulSoup, self).decode(
indent_level, eventual_encoding, formatter)
+# Alias to make it easier to type import: 'from bs4 import _soup'
+_s = BeautifulSoup
+_soup = BeautifulSoup
+
class BeautifulStoneSoup(BeautifulSoup):
"""Deprecated interface to an XML parser."""