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


Groups > comp.lang.python > #82326

Re: When do default parameters get their values set?

Newsgroups comp.lang.python
Date 2014-12-10 18:50 -0800
References (3 earlier) <mailman.16782.1418166477.18130.python-list@python.org> <bc561515-fe9d-41c1-bdda-7362e76aecdf@googlegroups.com> <mailman.16824.1418236733.18130.python-list@python.org> <c0d4cdaf-6d71-43ae-a998-d422fe4ecf0e@googlegroups.com> <mailman.16834.1418264648.18130.python-list@python.org>
Message-ID <17ff7b91-77cd-4660-a7ee-c9a1d512b06c@googlegroups.com> (permalink)
Subject Re: When do default parameters get their values set?
From Rustom Mody <rustompmody@gmail.com>

Show all headers | View raw


On Thursday, December 11, 2014 8:05:13 AM UTC+5:30, Chris Angelico wrote:
> On Thu, Dec 11, 2014 at 1:18 PM, Rustom Mody  wrote:
> > But I have a different question -- can this be demonstrated without the 'is'?
> > Because to me 'is' -- equivalently id -- is a code-smell and is like
> > explaining funny behavior by showing the dis -- like
> > $ gcc -S ...
> > -- output.
> >
> > It can always explain, but indicates that the semantics is not (sufficiently) abstract in this aspect
> 
> Not so. Object identity is a fundamental part of Python.
> Indistinguishable-but-distinct mutable objects are crucial to Python's
> behaviour.

You are saying much the same as I am.

Most programmers try to write programs without gotos.
Good (C) programmers know that 
1. gotos can be more efficient than 'structured' code
2. And even sometimes more elegant -- think of coding a non-trivial
automaton with State=Label, Transition=goto

Still most (reasonable) C-programmers will at least try to
write goto-less code.

Analogously here: 'is/id' are part of python.
Nevertheless *explaining* something with and without these
are significantly different.

Naturally we may have different feelings about 'is' in python.
However 'agree/disagree' is (in my book) a verb that is
applied to facts not feelings :-)

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


Thread

When do default parameters get their values set? "bSneddon" <bsneddon@1:249/999.remove-cdt-this> - 2014-12-09 11:32 -0500
  Re: When do default parameters get their values set? "Chris Angelico" <chris.angelico@1:249/999.remove-cdt-this> - 2014-12-09 11:32 -0500
  Re: When do default parameters get their values set? "Dave Angel" <dave.angel@1:249/999.remove-cdt-this> - 2014-12-09 11:32 -0500
    Re: When do default parameters get their values set? Duncan Booth <duncan.booth@invalid.invalid> - 2014-12-09 21:18 +0000
      Re: When do default parameters get their values set? random832@fastmail.us - 2014-12-09 18:07 -0500
        Re: When do default parameters get their values set? Rustom Mody <rustompmody@gmail.com> - 2014-12-09 18:44 -0800
          Re: When do default parameters get their values set? random832@fastmail.us - 2014-12-10 13:38 -0500
            Re: When do default parameters get their values set? Rustom Mody <rustompmody@gmail.com> - 2014-12-10 18:18 -0800
              Re: When do default parameters get their values set? Chris Angelico <rosuav@gmail.com> - 2014-12-11 13:24 +1100
                Re: When do default parameters get their values set? Rustom Mody <rustompmody@gmail.com> - 2014-12-10 18:50 -0800
              Re: When do default parameters get their values set? Steven D'Aprano <steve@pearwood.info> - 2014-12-11 03:15 +0000
                Re: When do default parameters get their values set? Rustom Mody <rustompmody@gmail.com> - 2014-12-10 19:26 -0800
                Re: When do default parameters get their values set? Ben Finney <ben+python@benfinney.id.au> - 2014-12-11 14:49 +1100
                Re: When do default parameters get their values set? Chris Kaynor <ckaynor@zindagigames.com> - 2014-12-11 09:10 -0800
                Re: When do default parameters get their values set? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-12-12 09:51 +1100
              Re: When do default parameters get their values set? random832@fastmail.us - 2014-12-11 15:44 -0500
  Re: When do default parameters get their values set? "Tim Chase" <tim.chase@1:249/999.remove-cdt-this> - 2014-12-09 11:32 -0500

csiph-web