Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #47932

Re: "Don't rebind built-in names*" - it confuses readers

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!dedekind.zen.co.uk!zen.net.uk!hamilton.zen.co.uk!reader01.nrc01.news.zen.net.uk.POSTED!not-for-mail
From Nobody <nobody@nowhere.com>
Subject Re: "Don't rebind built-in names*" - it confuses readers
Date Thu, 13 Jun 2013 11:09:29 +0100
User-Agent Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.)
Message-Id <pan.2013.06.13.10.09.28.882000@nowhere.com>
Newsgroups comp.lang.python
References <kp5q5o$fj1$1@ger.gmane.org> <mailman.3096.1371040064.3114.python-list@python.org> <kpa0ae$b4t$1@reader1.panix.com> <CAMjeLr_ozpfk3TxaEOaenoES5jUpYnZDaYWcNbX1FctO8OLuDw@mail.gmail.com> <CAPTjJmrwx6BV=Crm9bYeayRH83OGJ48w_fy_MpB-_wHpgfimpA@mail.gmail.com> <CAMjeLr9Qm5uA8AA5G3rm+ikN+f3JoVjS_j9_nhuU7m3s+WbydQ@mail.gmail.com> <CAPTjJmp9XU00TM=RTNN=+=fq5jv7W3i4-XuOqVcAYNvZP7AVGg@mail.gmail.com> <mailman.3147.1371083212.3114.python-list@python.org> <51b91f0f$0$29997$c3e8da3$5496439d@news.astraweb.com>
MIME-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8bit
Lines 12
Organization Zen Internet
NNTP-Posting-Host 8b0529fd.news.zen.co.uk
X-Trace DXC=lcM4LhQKIndZg[GfKlWS8da0UP_O8AJol=dR0\ckLKG`WeZ<[7LZNRfooog0lZ[gPdM2Z^cWRFGAkQh\F7Zfo2ol
X-Complaints-To abuse@zen.co.uk
Xref csiph.com comp.lang.python:47932

Show key headers only | View raw


On Thu, 13 Jun 2013 01:23:27 +0000, Steven D'Aprano wrote:

> Python does have a globally-global namespace. It is called "builtins", and
> you're not supposed to touch it. Of course, being Python, you can if you
> want, but if you do, you are responsible for whatever toes you shoot off.
> 
> Modifying builtins will effect *all modules*. That's normally too much,
> although it can very, very, very occasionally be useful.

For a specific example, gettext.install() adds the _() function to the
builtins namespace.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: "Don't rebind built-in names*" - it confuses readers Mark Janssen <dreamingforward@gmail.com> - 2013-06-10 17:18 -0700
  Re: "Don't rebind built-in names*" - it confuses readers Grant Edwards <invalid@invalid.invalid> - 2013-06-12 14:24 +0000
    Re: "Don't rebind built-in names*" - it confuses readers Mark Janssen <dreamingforward@gmail.com> - 2013-06-12 12:40 -0700
    Re: "Don't rebind built-in names*" - it confuses readers Chris Angelico <rosuav@gmail.com> - 2013-06-13 06:30 +1000
    Re: "Don't rebind built-in names*" - it confuses readers Mark Janssen <dreamingforward@gmail.com> - 2013-06-12 16:07 -0700
    Re: "Don't rebind built-in names*" - it confuses readers Chris Angelico <rosuav@gmail.com> - 2013-06-13 09:53 +1000
      Re: "Don't rebind built-in names*" - it confuses readers Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-13 00:47 +0000
    Re: "Don't rebind built-in names*" - it confuses readers Skip Montanaro <skip@pobox.com> - 2013-06-12 19:06 -0500
    Re: "Don't rebind built-in names*" - it confuses readers Mark Janssen <dreamingforward@gmail.com> - 2013-06-12 17:26 -0700
      Re: "Don't rebind built-in names*" - it confuses readers Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-13 01:23 +0000
        Re: "Don't rebind built-in names*" - it confuses readers Nobody <nobody@nowhere.com> - 2013-06-13 11:09 +0100
    Re: "Don't rebind built-in names*" - it confuses readers Chris Angelico <rosuav@gmail.com> - 2013-06-13 10:28 +1000

csiph-web