Expression problem.

Nethirlon . nethirlon at gmail.com
Wed Oct 6 04:32:20 EDT 2010


Hi,

I am having trouble with an expression.

I have the following line of code:

self.failUnless(c.as == 65215)

What happens when you compile this is that you get a syntax error.
This is because as has been made a keyword. failUnless is from the
module unittest.

Now my problem is this. the ".as" is no where defined in the code. The
code builds just fine if you removed it. But the origigal programmer
must have put it in for a reason. I just cant understand what that is.

Can anyone point me into the right direction? was ".as" before it
became a keyword some kind of string manipulator?

Let me know if you need more info.
Thanks



More information about the Python-list mailing list