summaryrefslogtreecommitdiff
path: root/CHANGELOG
diff options
context:
space:
mode:
authorLeonard Richardson <leonard.richardson@canonical.com>2011-02-18 07:51:46 -0500
committerLeonard Richardson <leonard.richardson@canonical.com>2011-02-18 07:51:46 -0500
commit01ba489720b7bde42890221eb83a0b743d7aea8d (patch)
treed7eb753aa5028840b83615db394abd7e0de06b6b /CHANGELOG
parent58e3fca6b4f1313f5a8998d157068876efc5156f (diff)
parent4eda5e1cf72ddb1b6a857d5bf9c8c655000d4990 (diff)
Renamed all the search methods to conform with PEP 8.
Diffstat (limited to 'CHANGELOG')
-rw-r--r--CHANGELOG51
1 files changed, 51 insertions, 0 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 0bfe72a..dffab7c 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,49 @@
= 4.0 =
+== Better method names ==
+
+Methods have been renamed to comply with PEP 8. The old names still
+work. Here are the renames:
+
+ * findAll -> find_all
+ * findAllNext -> find_all_next
+ * findAllPrevious -> find_all_previous
+ * findNext -> find_next
+ * findNextSibling -> find_next_sibling
+ * findNextSiblings -> find_next_siblings
+ * findParent -> find_parent
+ * findParents -> find_parents
+ * findPrevious -> find_previous
+ * findPreviousSibling -> find_previous_sibling
+ * findPreviousSiblings -> find_previous_siblings
+
+== Generators are now properties ==
+
+The generators have been given more sensible (and PEP 8-compliant)
+names, and turned into properties:
+
+ * childGenerator() -> children
+ * nextGenerator() -> next_elements
+ * nextSiblingGenerator() -> next_siblings
+ * previousGenerator() -> previous_elements
+ * previousSiblingGenerator() -> previous_siblings
+ * recursiveChildGenerator() -> recursive_children
+ * parentGenerator() -> parents
+
+So instead of this:
+
+ for parent in tag.parentGenerator():
+ ...
+
+You can write this:
+
+ for parent in tag.parents:
+ ...
+
+(But the old code will still work.)
+
+== tag.string is recursive ==
+
tag.string now operates recursively. If tag A contains a single tag B
and nothing else, then A.string is the same as B.string. So:
@@ -7,6 +51,13 @@ and nothing else, then A.string is the same as B.string. So:
The value of a.string used to be None, and now it's "foo".
+== Entities are always converted to Unicode ==
+
+An HTML or XML entity is always converted into the corresponding
+Unicode character. There are no longer any smartQuotesTo or
+convertEntities arguments. (Unicode Dammit still has smartQuotesTo,
+though that may change.)
+
= 3.1.0 =
A hybrid version that supports 2.4 and can be automatically converted