Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '"this': 0.03; 'syntax': 0.04; 'subject:code': 0.07; 'subject:file': 0.07; 'string': 0.09; "'return": 0.09; 'builtin': 0.09; 'parameter': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'trailing': 0.09; 'python': 0.11; 'def': 0.12; 'jan': 0.12; "';'": 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'subject: \n ': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'written': 0.21; 'print': 0.22; 'header:User- Agent:1': 0.23; 'instead.': 0.24; 'subject:problem': 0.24; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'leave': 0.29; 'code': 0.31; 'implicit': 0.31; 'prints': 0.31; 'return;': 0.31; 'subject:that': 0.31; 'file': 0.32; 'run': 0.32; 'another': 0.32; 'something': 0.35; 'there': 0.35; 'possible': 0.36; 'error.': 0.37; 'list': 0.37; 'to:addr :python-list': 0.38; 'pm,': 0.38; 'does': 0.39; 'bad': 0.39; 'delete': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'received:173': 0.61; 'name': 0.63; 'notified': 0.63; 'our': 0.64; 'received:fios.verizon.net': 0.84; 'directly.': 0.95 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Jan Reedy Subject: Re: problem in running a basic code in python 3.3.0 that includes HTML file Date: Thu, 04 Apr 2013 15:48:27 -0400 References: <4b7526eb-b501-4ff8-a257-8cfefbeda413@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-173-75-251-66.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 In-Reply-To: <4b7526eb-b501-4ff8-a257-8cfefbeda413@googlegroups.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 55 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1365104927 news.xs4all.nl 6909 [2001:888:2000:d::a6]:52687 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:42775 On 4/4/2013 3:08 PM, Satabdi Mukherjee wrote: > i have written this code and i need to run this file > > def CreateEvent(str): Using the builtin name 'str' as a parameter name is a bad idea. Use 's' or 'string' or something instead. > "This prints a passed string into this function"; The line above has to be indented. Leave off the trailing ';' > print str; This is not valid in Python 3, where print() is a function This line would have to be 'print(s)'. However, the function as written is senseless; just call print() directly. > return; And empty return at the end does nothing. There is already an implicit 'return None' at the end of every function. > CreateEvent (print''' delete 'print' -- it is another syntax error. > content-type: text/html > > > > the list of all possible events that can be notified by our system > > >
> tsunami
> earthquake
> volcano
> hurricane
> sinkholes
> tornado
> landslide
> downburst
>
> > > > > ''') -- Terry Jan Reedy