@@ -2,6 +2,8 @@ v0.5 (unreleased): | |||||
- Made Template.remove(keep_field=True) behave more reasonably when the | - Made Template.remove(keep_field=True) behave more reasonably when the | ||||
parameter is already empty. | parameter is already empty. | ||||
- Wikicode objects can now be pickled properly (fixed infinite recursion error | |||||
on incompletely-constructed StringMixIn subclasses). | |||||
- Fixed Wikicode.matches()'s behavior on iterables besides lists and tuples. | - Fixed Wikicode.matches()'s behavior on iterables besides lists and tuples. | ||||
- Fixed len() sometimes raising ValueError on empty node lists. | - Fixed len() sometimes raising ValueError on empty node lists. | ||||
- Fixed release script after changes to PyPI. | - Fixed release script after changes to PyPI. | ||||
@@ -9,6 +9,9 @@ Unreleased | |||||
- Made :meth:`Template.remove(keep_field=True) <.Template.remove>` behave more | - Made :meth:`Template.remove(keep_field=True) <.Template.remove>` behave more | ||||
reasonably when the parameter is already empty. | reasonably when the parameter is already empty. | ||||
- :class:`.Wikicode` objects can now be pickled properly (fixed infinite | |||||
recursion error on incompletely-constructed :class:`.StringMixIn` | |||||
subclasses). | |||||
- Fixed :meth:`.Wikicode.matches`\ 's behavior on iterables besides lists and | - Fixed :meth:`.Wikicode.matches`\ 's behavior on iterables besides lists and | ||||
tuples. | tuples. | ||||
- Fixed ``len()`` sometimes raising ``ValueError`` on empty node lists. | - Fixed ``len()`` sometimes raising ``ValueError`` on empty node lists. | ||||
@@ -108,6 +108,9 @@ class StringMixIn(object): | |||||
return str(item) in self.__unicode__() | return str(item) in self.__unicode__() | ||||
def __getattr__(self, attr): | def __getattr__(self, attr): | ||||
if not hasattr(str, attr): | |||||
raise AttributeError("{0!r} object has no attribute {1!r}".format( | |||||
type(self).__name__, attr)) | |||||
return getattr(self.__unicode__(), attr) | return getattr(self.__unicode__(), attr) | ||||
if py3k: | if py3k: | ||||