Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!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.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'syntax': 0.04; 'python3': 0.07; 'cc:addr:python-list': 0.11; 'python': 0.11; '3)]': 0.16; 'builtins.': 0.16; 'from:addr:pobox.com': 0.16; 'from:addr:skip': 0.16; 'syntaxerror:': 0.16; 'then?': 0.16; 'sender:addr:gmail.com': 0.17; 'bit': 0.19; 'feb': 0.22; '>>>': 0.22; 'cc:addr:gmail.com': 0.22; 'cc:addr:python.org': 0.22; 'print': 0.22; 'cc:2**1': 0.23; 'skip': 0.24; 'cc:no real name:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'message-id:@mail.gmail.com': 0.30; 'skip:( 20': 0.30; "i'm": 0.30; '"",': 0.31; 'file': 0.32; 'received:google.com': 0.35; 'keyword': 0.36; 'more': 0.64; 'to:addr:gmail.com': 0.65; 'invalid': 0.68; '4.2.1': 0.84; '2013,': 0.91; 'subject:Don': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=ojWMM8V55+ooJ5GRAvyAOk+L2HLEa1cLJjtifZMM1xg=; b=H9I2nj+VPkUfyayD3s2VsM8Apz+i4HaKH/x02Wo3XdzYX493LcEE0YQZLbZDXS6B6r eViYReef0fLoM1ZTd475zWVf0HJDRL0byTCSpAJV3i3/Vusd7cx1YSWwNs8ARWQnkMQx GGvTanQcyeaGS9EIqXmev3BjgCc8RXDJUbIKyOyx7OB1PKwe4wsJUiagcVsxn/+dzB5x 1WVVBye3Mc8A+rn2r1QcjwaPWno9APmD6MwGcBVuW1JwrKR8EFw+eND1ljiOic4fVi60 e1psUg2v1iEVhNCJZKTDOzhcLDD2mXmaohxEwu53CG8wo9WWg8EUYT1DWmG3pE26mN7z 9PLA== MIME-Version: 1.0 X-Received: by 10.50.67.110 with SMTP id m14mr4395308igt.37.1371081968966; Wed, 12 Jun 2013 17:06:08 -0700 (PDT) Sender: skip.montanaro@gmail.com In-Reply-To: References: Date: Wed, 12 Jun 2013 19:06:08 -0500 X-Google-Sender-Auth: Ww8pI0PTSUWQYlhYSA8FnjS27pY Subject: Re: "Don't rebind built-in names*" - it confuses readers From: Skip Montanaro To: Mark Janssen Content-Type: text/plain; charset=UTF-8 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: 27 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1371081976 news.xs4all.nl 15914 [2001:888:2000:d::a6]:55502 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:47864 > Okay, now I'm a bit confused. "print" is both a and a > member of the builtins. What happens then? It's a keyword in Python < 3, a built-in function in Python >= 3: ~% python3 Python 3.4.0a0 (default:96f08a22f562, Feb 24 2013, 23:37:53) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> print >>> x = print >>> ~% python2 Python 2.7.5+ (2.7:4657d0eebe42, Jun 2 2013, 07:46:59) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> print >>> x = print File "", line 1 x = print ^ SyntaxError: invalid syntax Skip