md5 strange error
Steven D'Aprano
steven at REMOVE.THIS.cybersource.com.au
Thu Oct 22 02:33:38 EDT 2009
On Wed, 21 Oct 2009 01:11:29 -0700, catalinfest at gmail.com wrote:
> I have this error , what happen ?
>
> Python 2.5.2 (r252:60911, Sep 30 2008, 15:41:38) [GCC 4.3.2 20080917
> (Red Hat 4.3.2-4)] on linux2 Type "help", "copyright", "credits" or
> "license" for more information.
>>>> import md5
>>>> pass = md5.new()
> File "<stdin>", line 1
> pass = md5.new()
> ^
> SyntaxError: invalid syntax
>>>> m = md5.new()
>>>> n = md5.new()
What makes you think it's an error with md5? As you can see, md5 works
fine. The error message tells you the problem occurs *before* the call to
md5.new().
>>> pass = 45
File "<stdin>", line 1
pass = 45
^
SyntaxError: invalid syntax
As others have told you, it's a problem with pass, which is a statement
and reserved word.
--
Steven
More information about the Python-list
mailing list