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


Groups > comp.lang.python > #8276

Re: python 3 constant

From Ben Finney <ben+python@benfinney.id.au>
Newsgroups comp.lang.python
Subject Re: python 3 constant
References <927fca1e-ca72-4d33-965c-70b812b83d50@glegroupsg2000goo.googlegroups.com> <mailman.301.1308777491.1164.python-list@python.org> <192j4fjo2gskg$.dlg@localhost.localdomain>
Date 2011-06-23 17:22 +1000
Message-ID <87y60tnhaa.fsf@benfinney.id.au> (permalink)
Organization Unlimited download news at news.astraweb.com

Show all headers | View raw


"Waldek M." <wm@localhost.localdomain> writes:

> Still, I'd reallly like to have constants as a built-in...

If you mean creating a binding which can't be re-bound: −1.

The ability to re-bind any attribute, even ones which the author thought
should be constant, makes writing unit tests much easier. I don't see
that putative benefits of constant bindings would be anywhere near as
valuable.

-- 
 \       “I love and treasure individuals as I meet them, I loathe and |
  `\     despise the groups they identify with and belong to.” —George |
_o__)                                                     Carlin, 2007 |
Ben Finney

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


Thread

python 3 constant sidRo <slacky2005@gmail.com> - 2011-06-22 11:54 -0700
  Re: python 3 constant Noah Hall <enalicho@gmail.com> - 2011-06-22 22:17 +0100
    Re: python 3 constant "Waldek M." <wm@localhost.localdomain> - 2011-06-23 08:40 +0200
      Re: python 3 constant Ben Finney <ben+python@benfinney.id.au> - 2011-06-23 17:22 +1000
        Re: python 3 constant "Waldek M." <wm@localhost.localdomain> - 2011-06-23 13:58 +0200
          Re: python 3 constant Ben Finney <ben+python@benfinney.id.au> - 2011-06-23 23:04 +1000
            Re: python 3 constant "Waldek M." <wm@localhost.localdomain> - 2011-06-25 12:42 +0200
          Re: python 3 constant Chris Angelico <rosuav@gmail.com> - 2011-06-24 01:29 +1000
            Re: python 3 constant "Waldek M." <wm@localhost.localdomain> - 2011-06-23 21:56 +0200
              Re: python 3 constant Chris Angelico <rosuav@gmail.com> - 2011-06-24 08:00 +1000
                Re: python 3 constant "Waldek M." <wm@localhost.localdomain> - 2011-06-25 12:50 +0200
                Re: python 3 constant Chris Angelico <rosuav@gmail.com> - 2011-06-25 20:59 +1000
                Re: python 3 constant "Waldek M." <wm@localhost.localdomain> - 2011-06-25 13:24 +0200
              Re: python 3 constant alex23 <wuwei23@gmail.com> - 2011-06-23 20:04 -0700
                Re: python 3 constant "Waldek M." <wm@localhost.localdomain> - 2011-06-25 12:44 +0200

csiph-web