Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.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.034 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; 'syntax': 0.04; 'subject:Why': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; '-tkc': 0.16; '2.7.3': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'syntaxerror:': 0.16; 'wrote:': 0.18; '>>>': 0.22; 'import': 0.22; 'cc:addr:python.org': 0.22; 'fine': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'header:In-Reply-To:1': 0.27; '"",': 0.31; 'file': 0.32; 'worked': 0.33; 'subject:the': 0.34; 'subject:from': 0.34; 'charset:us-ascii': 0.36; 'subject:?': 0.36; 'sure': 0.39; 'email addr:gmail.com': 0.63; 'more': 0.64; 'to:addr:gmail.com': 0.65; 'mar': 0.68; 'invalid': 0.68; '2014,': 0.84; 'cygwin': 0.84; 'received:50.22': 0.84; '2013,': 0.91 Date: Sun, 6 Jul 2014 07:54:42 -0500 From: Tim Chase To: rxjwg98@gmail.com Subject: Re: Why is it different from the example on the tutorial? In-Reply-To: References: X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - boston.accountservergroup.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tim.thechases.com X-Get-Message-Sender-Via: boston.accountservergroup.com: authenticated_id: tim@thechases.com Cc: python-list@python.org 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: 35 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1404651349 news.xs4all.nl 2903 [2001:888:2000:d::a6]:35147 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:74009 On 2014-07-06 05:13, rxjwg98@gmail.com wrote: > What I get on Python console: > > $ python > Python 2.7.5 (default, Oct 2 2013, 22:34:09) > [GCC 4.8.1] on cygwin > Type "help", "copyright", "credits" or "license" for more > information. > >>> import re > >>> p = re.compile('ab*') > File "", line 1 > p = re.compile('ab*') > ^ > SyntaxError: invalid syntax > >>> Are you sure that you copied/pasted that directly from the console instead of transcribing it with some mistake? I just did the same thing at the console and it worked perfectly fine $ python Python 2.7.3 (default, Mar 13 2014, 11:03:55) [GCC 4.7.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import re >>> p = re.compile('ab*') >>> -tkc