Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #47882
| Path | csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!cs.uu.nl!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.009 |
| X-Spam-Evidence | '*H*': 0.98; '*S*': 0.00; 'skip:[ 20': 0.04; 'namespace': 0.09; 'oh,': 0.09; 'python': 0.11; 'language,': 0.12; '"s"': 0.16; '__builtin__': 0.16; 'builtins': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'underscores,': 0.16; 'wrote:': 0.18; 'first.': 0.19; 'thu,': 0.19; 'import': 0.22; 'sorry,': 0.24; 'tend': 0.24; 'defined': 0.27; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; '13,': 0.31; 'bad.': 0.31; "d'aprano": 0.31; 'steven': 0.31; 'running': 0.33; 'skip:_ 10': 0.34; 'knows': 0.35; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; "he's": 0.36; 'idle': 0.36; 'skip:[ 10': 0.38; 'to:addr:python-list': 0.38; 'rather': 0.38; 'use.': 0.39; 'to:addr:python.org': 0.39; 'matter': 0.61; 'detail.': 0.68; 'subject:Don': 0.91; '2013': 0.98 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=bOv6/GIRv6dEz9mgx9G+AJQZQMiRmcdbShEt7D4oAMk=; b=VmPSa8Vr7LWeI8czdUDZOVAhF+z1SaNVlGRbRpXJCCxXASixy6zeteiCSAXRi6x4pk CaUgfQDNXRJN96rwdYvKdTvnbo1q1a+ISy+f1ayO5dCuKE/hKJlIUuJ9suueHZOZK8QG GCQzD5YI2KnsNmSrLhNcuwLVDss/YlOzRXhHzXJkrWWXjgoeIYWFWmWwhiltrlOS8wFI e8NPuKNc7GOfdIXBoAi/bQCUQUxr7RUp+oIIpBQNf0Iy/0jkj3/rQZtiC3CGDFbUGhUO usMX/G61jAvgCvjg6vzt37lN5vGqtXMq7/gELnmJFvxFiJ8vjFcJJBVR/qD7OCgfBFR5 UT+g== |
| MIME-Version | 1.0 |
| X-Received | by 10.58.214.105 with SMTP id nz9mr10457013vec.58.1371087002128; Wed, 12 Jun 2013 18:30:02 -0700 (PDT) |
| In-Reply-To | <51b91b89$0$29997$c3e8da3$5496439d@news.astraweb.com> |
| References | <mailman.3001.1370909708.3114.python-list@python.org> <dffd70ad-4e9a-45cd-914b-7f1388ded5a2@a9g2000pbq.googlegroups.com> <51b69332$0$29997$c3e8da3$5496439d@news.astraweb.com> <CAMjeLr9pURVnRmsFFuOt5vxGvDMmmyTzmR49-k5ourng98VsiQ@mail.gmail.com> <mailman.3145.1371082102.3114.python-list@python.org> <51b91b89$0$29997$c3e8da3$5496439d@news.astraweb.com> |
| Date | Thu, 13 Jun 2013 11:30:02 +1000 |
| Subject | Re: "Don't rebind built-in names*" - it confuses readers |
| From | Chris Angelico <rosuav@gmail.com> |
| To | python-list@python.org |
| Content-Type | text/plain; charset=ISO-8859-1 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3151.1371087004.3114.python-list@python.org> (permalink) |
| Lines | 22 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1371087004 news.xs4all.nl 15875 [2001:888:2000:d::a6]:34195 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:47882 |
Show key headers only | View raw
On Thu, Jun 13, 2013 at 11:08 AM, Steven D'Aprano <steve+comp.lang.python@pearwood.info> wrote: > On Thu, 13 Jun 2013 10:08:14 +1000, Chris Angelico wrote: > >>>>> int="five" >>>>> [__builtins__.int(i) for i in ["1","2","3"]] > > Don't use __builtins__, it's an implementation detail. > > In Python 2.x, there is __builtins__ with an "s" in the global namespace > if you are running CPython, but not necessarily other implementations. > There is __builtin__ with no "s" which is defined by the language, but > you have to import it first. > > In Python 3.x, you just import builtins with an "s" and no underscores, > no matter what implementation you use. Oh, sorry, my bad. I tend to just whip something up in IDLE and see if it works, rather than actually check the spec. Listen to Steven, he knows what he's about! ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
"Don't rebind built-in names*" - it confuses readers Terry Jan Reedy <tjreedy@udel.edu> - 2013-06-10 20:14 -0400
Re: "Don't rebind built-in names*" - it confuses readers rusi <rustompmody@gmail.com> - 2013-06-10 19:36 -0700
Re: "Don't rebind built-in names*" - it confuses readers Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-11 03:02 +0000
Re: "Don't rebind built-in names*" - it confuses readers rusi <rustompmody@gmail.com> - 2013-06-10 20:30 -0700
Re: "Don't rebind built-in names*" - it confuses readers Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-11 05:52 +0000
Re: "Don't rebind built-in names*" - it confuses readers Chris Angelico <rosuav@gmail.com> - 2013-06-11 17:20 +1000
Re: "Don't rebind built-in names*" - it confuses readers Chris Angelico <rosuav@gmail.com> - 2013-06-11 13:57 +1000
Re: "Don't rebind built-in names*" - it confuses readers Serhiy Storchaka <storchaka@gmail.com> - 2013-06-11 18:55 +0300
Re: "Don't rebind built-in names*" - it confuses readers Mark Janssen <dreamingforward@gmail.com> - 2013-06-12 17:04 -0700
Re: "Don't rebind built-in names*" - it confuses readers Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-13 01:01 +0000
Re: "Don't rebind built-in names*" - it confuses readers Chris Angelico <rosuav@gmail.com> - 2013-06-13 10:08 +1000
Re: "Don't rebind built-in names*" - it confuses readers Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-13 01:08 +0000
Re: "Don't rebind built-in names*" - it confuses readers Chris Angelico <rosuav@gmail.com> - 2013-06-13 11:30 +1000
Re: "Don't rebind built-in names*" - it confuses readers Skip Montanaro <skip@pobox.com> - 2013-06-12 19:18 -0500
Re: "Don't rebind built-in names*" - it confuses readers Chris Angelico <rosuav@gmail.com> - 2013-06-13 10:33 +1000
Re: "Don't rebind built-in names*" - it confuses readers Ethan Furman <ethan@stoneleaf.us> - 2013-06-12 17:30 -0700
Re: "Don't rebind built-in names*" - it confuses readers Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-11 02:56 +0000
Re: "Don't rebind built-in names*" - it confuses readers Terry Jan Reedy <tjreedy@udel.edu> - 2013-06-11 02:06 -0400
Re: "Don't rebind built-in names*" - it confuses readers Rick Johnson <rantingrickjohnson@gmail.com> - 2013-06-11 08:22 -0700
Re: "Don't rebind built-in names*" - it confuses readers Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-11 16:59 +0000
Re: "Don't rebind built-in names*" - it confuses readers Chris Angelico <rosuav@gmail.com> - 2013-06-12 03:32 +1000
csiph-web