There is clesarly some other issue with the recipe. As you can see from this Python session what I proposed does work.
Code:
C:\Python27>python
Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from BeautifulSoup import *
>>> x=BeautifulSoup('<html><body><div class="module bodytext">content</div></body></html>')
>>> print x
<html><body><div class="module bodytext">content</div></body></html>
>>> y=x.findAll('div','module bodytext')
>>> print y
[<div class="module bodytext">content</div>]
>>> for y in x.findAll('div','module bodytext'): y['class']='module'
...
>>> print x
<html><body><div class="module">content</div></body></htmt>
>>>