diff options
author | Leonard Richardson <leonard.richardson@canonical.com> | 2011-02-18 07:16:44 -0500 |
---|---|---|
committer | Leonard Richardson <leonard.richardson@canonical.com> | 2011-02-18 07:16:44 -0500 |
commit | 1c9359dbdf3266d35ea87ed0fa8e197855dcd84b (patch) | |
tree | 1d7fdcde7c32e335d74dd6ef18ccb8297aa7edb8 /CHANGELOG | |
parent | 0267ea2c652e3953b0c3fb372603466e506e7f20 (diff) |
Renamed the generators and made them properties.
Diffstat (limited to 'CHANGELOG')
-rw-r--r-- | CHANGELOG | 26 |
1 files changed, 24 insertions, 2 deletions
@@ -1,12 +1,34 @@ = 4.0 = -Methods have been renamed for comply with PEP 8. findAll is now -find_all, and so on. Old names still work. +== Better method names == + +Methods have been renamed to comply with PEP 8. The old names still +work. Here are the renames: * findAll -> find_all + +The generators have been given more sensible 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: + ... +== 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: |