Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: dieter Newsgroups: comp.lang.python Subject: Re: Traceback error Date: Sat, 21 Nov 2015 08:31:13 +0100 Lines: 18 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.uni-berlin.de 881ku1QSC5Vcj6jviA/PGAPfmAhA5Ld3E81n8apk7aNw== Cancel-Lock: sha1:jhrflfQf6FkjK8PHF+bWl1vihV4= Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'nameerror:': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:error': 0.11; 'appropriate': 0.14; '"python",': 0.16; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'received:t-ipconnect.de': 0.16; 'have:': 0.18; 'assign': 0.22; 'defined': 0.23; 'tried': 0.24; '(most': 0.24; 'header:User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'error': 0.27; 'there.': 0.30; 'code': 0.30; 'run': 0.33; 'traceback': 0.33; 'file': 0.34; 'false': 0.35; 'comment': 0.35; 'problem.': 0.35; 'lines': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'charset:us-ascii': 0.37; 'to:addr:python.org': 0.40; 'received:de': 0.40; 'your': 0.60; 'information': 0.63; 'received:217': 0.66; '"j"': 0.84 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: pd9e09693.dip0.t-ipconnect.de User-Agent: Gnus/5.1008 (Gnus v5.10.8) XEmacs/21.4.22 (linux) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:99200 Cai Gengyang writes: > This is a piece of code about comparators : > j# Assign True or False as appropriate on the lines below! > ... > When I tried to run it, this is the error I got : > > Traceback (most recent call last): > File "python", line 1, in > NameError: name 'j' is not defined The error information is very precise: in your line 1, you have: j# Assign True or False as appropriate on the lines below! The "j" before the comment ("#...") is what causes the problem. Likely, you did not want it there.