Problem with

and-google at and-google at
Sat Jul 9 14:05:25 CEST 2005

Florian Lindner wrote:

>         sha =

> this generates a traceback when is called for the second time

You have reassigned the variable 'sha'.

First time around, sha is the sha module object as obtained by 'import
sha'. Second time around, sha is the SHA hashing object you used the
first time around. This does not have a 'new' method.

Python does not have separate namespaces for packages and variables.
Modules are stored in variables just like any other object.

Andrew Clover
mailto:and at

More information about the Python-list mailing list