Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #47618
| Date | 2013-06-10 18:24 -0500 |
|---|---|
| From | Tim Chase <python.list@tim.thechases.com> |
| Subject | Re: Newbie: question regarding references and class relationships |
| References | (9 earlier) <mailman.2983.1370893881.3114.python-list@python.org> <kp5bot$sh2$1@dont-email.me> <mailman.2988.1370902047.3114.python-list@python.org> <kp5kjd$ppk$1@reader1.panix.com> <CAPTjJmosRs7gXrQ12ph1+Yg1dcsFNzykdP=3j0NFj1tedpiBjw@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2998.1370906564.3114.python-list@python.org> (permalink) |
On 2013-06-11 08:54, Chris Angelico wrote: > >> Another principle similar to 'Don't add extraneous code' is > >> 'Don't rebind builtins'. > > > > OK, we've all done it by accident (especially when starting out), > > but are there people that rebind builtins intentionally? > > There are times when you don't care what you shadow, like using id > for a database ID. While that's certainly the most common, there are a lot of items in __builtins__ that are there for convenience that I wouldn't think twice about rebinding, especially in a local scope (I might take more care at a module scope, but still wouldn't care much). E.g. apply bin buffer coerce filter format input Some are deprecated, some are easily replaced by (what I consider more readible) list comprehensions, and some have alternate meanings that might be the right word-choice inside a function and wouldn't be missed (I'd expect to see a bin-sort function use variables called "bin" and not needing to convert from integer-to-string) And some strings that are harmless outside the interactive interpreter copyright credits exit license quit -tkc
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Newbie: question regarding references and class relationships Rui Maciel <rui.maciel@gmail.com> - 2013-06-10 14:18 +0100
Re: Newbie: question regarding references and class relationships Roy Smith <roy@panix.com> - 2013-06-10 09:35 -0400
Re: Newbie: question regarding references and class relationships Rui Maciel <rui.maciel@gmail.com> - 2013-06-10 14:57 +0100
Re: Newbie: question regarding references and class relationships Rui Maciel <rui.maciel@gmail.com> - 2013-06-10 15:00 +0100
Re: Newbie: question regarding references and class relationships Ian Kelly <ian.g.kelly@gmail.com> - 2013-06-10 13:56 -0600
Re: Newbie: question regarding references and class relationships Rick Johnson <rantingrickjohnson@gmail.com> - 2013-06-11 17:02 -0700
Re: Newbie: question regarding references and class relationships Peter Otten <__peter__@web.de> - 2013-06-10 15:49 +0200
Re: Newbie: question regarding references and class relationships Rui Maciel <rui.maciel@gmail.com> - 2013-06-10 14:59 +0100
Re: Newbie: question regarding references and class relationships Peter Otten <__peter__@web.de> - 2013-06-10 16:28 +0200
Re: Newbie: question regarding references and class relationships Rui Maciel <rui.maciel@gmail.com> - 2013-06-10 15:38 +0100
Re: Newbie: question regarding references and class relationships Peter Otten <__peter__@web.de> - 2013-06-10 17:05 +0200
Re: Newbie: question regarding references and class relationships Rui Maciel <rui.maciel@gmail.com> - 2013-06-10 16:20 +0100
Re: Newbie: question regarding references and class relationships Peter Otten <__peter__@web.de> - 2013-06-10 17:55 +0200
Re: Newbie: question regarding references and class relationships Rui Maciel <rui.maciel@gmail.com> - 2013-06-10 17:09 +0100
Re: Newbie: question regarding references and class relationships Peter Otten <__peter__@web.de> - 2013-06-10 19:07 +0200
Re: Newbie: question regarding references and class relationships Rui Maciel <rui.maciel@gmail.com> - 2013-06-10 18:42 +0100
Re: Newbie: question regarding references and class relationships Dave Angel <davea@davea.name> - 2013-06-10 15:36 -0400
Re: Newbie: question regarding references and class relationships Rui Maciel <rui.maciel@gmail.com> - 2013-06-10 21:31 +0100
Re: Newbie: question regarding references and class relationships Terry Jan Reedy <tjreedy@udel.edu> - 2013-06-10 15:51 -0400
Re: Newbie: question regarding references and class relationships Rui Maciel <rui.maciel@gmail.com> - 2013-06-10 21:13 +0100
Re: Newbie: question regarding references and class relationships Terry Jan Reedy <tjreedy@udel.edu> - 2013-06-10 18:07 -0400
Re: Newbie: question regarding references and class relationships Grant Edwards <invalid@invalid.invalid> - 2013-06-10 22:39 +0000
Re: Newbie: question regarding references and class relationships Chris Angelico <rosuav@gmail.com> - 2013-06-11 08:54 +1000
Re: Newbie: question regarding references and class relationships Tim Chase <python.list@tim.thechases.com> - 2013-06-10 18:24 -0500
Re: Newbie: question regarding references and class relationships Dave Angel <davea@davea.name> - 2013-06-10 19:26 -0400
Re: Newbie: question regarding references and class relationships Jason Swails <jason.swails@gmail.com> - 2013-06-10 23:49 -0400
Re: Newbie: question regarding references and class relationships Terry Jan Reedy <tjreedy@udel.edu> - 2013-06-10 15:54 -0400
Re: Newbie: question regarding references and class relationships Rui Maciel <rui.maciel@gmail.com> - 2013-06-10 21:09 +0100
Re: Newbie: question regarding references and class relationships Rick Johnson <rantingrickjohnson@gmail.com> - 2013-06-11 16:50 -0700
Re: Newbie: question regarding references and class relationships Rui Maciel <rui.maciel@gmail.com> - 2013-06-13 13:06 +0100
Re: Newbie: question regarding references and class relationships Chris Angelico <rosuav@gmail.com> - 2013-06-14 00:07 +1000
Re: Newbie: question regarding references and class relationships Rui Maciel <rui.maciel@gmail.com> - 2013-06-13 19:23 +0100
csiph-web