RE: if statement

From: Tim Golden (tim.golden_at_viacom-outdoor.co.uk)
Date: 06/28/04


Date: Mon, 28 Jun 2004 13:46:22 +0100
To: python-list@python.org

Ajay>
> syntax error, invalid syntax is what i got

Ajay, you're going to have to try a bit harder. Can
you cut-and-paste the output from an interpreter session
into an email and send it? It's very hard to guess what's
going to go wrong from a small piece of code which can't
possibly run by itself, and the fact that you're
seeing a "syntax error, invalid syntax".

This is the kind of thing (although obviously
relevant to your program):

<screendump>

ActivePython 2.2.3 Build 227 (ActiveState Corp.) based on
Python 2.2.3 (#42, Nov 13 2003, 09:57:55) [MSC 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> x = 1
>>> b = 1|
  File "<stdin>", line 1
    b = 1|
         ^
SyntaxError: invalid syntax
>>>
</screendump>

TJG

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________



Relevant Pages

  • Re: ANN: The full version of CioinaEval 7.6.6 for Delphi 2007
    ... SadMan ExpEval-> Value expected ... ExpressIt-> Invalid syntax ... ScripterStudio-> Syntax error. ... Source position: 1,29 ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: How can I find the remainder when dividing 2 integers
    ... for str in strings: ... But i get an invalid syntax error when I execute the script: ... The syntax error comes from your use of the ++ operator not the modulo operator. ...
    (comp.lang.python)
  • Re: Printing lists in columns
    ... "Syntax Error: Invalid Syntax" ... with a ^ pointing to fillvalue:S ...
    (comp.lang.python)
  • Re: always raise syntax error!
    ... there's actually no syntax error at all!! ... Or maybe not -- my crystal ball is notoriously unreliable. ... How about you post the FULL traceback of the error, ... SyntaxError: invalid syntax ...
    (comp.lang.python)
  • Re: list a field based on a date
    ... The first one gives the same syntax error, but your second one works great! ... Lila wrote: ... I need to create a query that shows the name and the sale date. ... But I get an error The expression you entered contains invalid syntax. ...
    (microsoft.public.access.queries)