subtraction is giving me a syntax error

Benjamin Kaplan benjamin.kaplan at case.edu
Mon Mar 15 13:48:08 EDT 2010


On Mon, Mar 15, 2010 at 1:37 PM, Joel Pendery <joel.pendery at gmail.com>wrote:

> So I am trying to write a bit of code and a simple numerical
> subtraction
>
> y_diff = y_diff-H
>
> is giving me the error
>
> Syntaxerror: Non-ASCII character '\x96' in file on line 70, but no
> encoding declared.
>
> Even though I have deleted some lines before it and this line is no
> longer line 70, I am still getting the error every time.  I have tried
> to change the encoding of the file to utf-8 but to no avail, I still
> am having this issue.  Any ideas?
>
> Thanks in advance
>

It's not UTF-8. My guess would be that you're on Windows and it's a dash
character in cp1252. The actual minus sign is 0x2D. Your editor must be
putting in the wrong character.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100315/bbbe7fcf/attachment.html>


More information about the Python-list mailing list