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


Groups > comp.lang.python > #75038

Re: Question about Pass-by-object-reference?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!news2.arglkargh.de!news.swapon.de!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'subject:Question': 0.07; '[0,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'screen.': 0.09; 'scripts,': 0.09; "'mylist'": 0.16; 'involved?': 0.16; 'mylist': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:object': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'variable': 0.18; 'mechanism': 0.19; 'entered': 0.20; 'command': 0.22; 'header:User-Agent:1': 0.23; 'own.': 0.24; 'environment': 0.24; 'question': 0.24; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'usually': 0.31; '>>>>': 0.31; 'file': 0.32; 'run': 0.32; 'display': 0.35; 'shows': 0.36; 'subject:?': 0.36; 'to:addr :python-list': 0.38; 'pm,': 0.38; 'anything': 0.39; 'does': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'new': 0.61; 'line,': 0.68; 'prompt': 0.68; 'received:pacbell.net': 0.84; 'convenience,': 0.91
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From emile <emile@fenx.com>
Subject Re: Question about Pass-by-object-reference?
Date Tue, 22 Jul 2014 15:40:44 -0700
References <cc0616eb-642a-426c-a995-6665ee4c52b9@googlegroups.com> <986eee35-0327-46e5-bce0-b1ae4572dd8f@googlegroups.com> <c3808lFn5iuU1@mid.individual.net> <mailman.12193.1406062021.18130.python-list@python.org> <557fa1ab-a8d7-4ef7-bc6f-978f9cba5091@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host adsl-69-226-129-65.dsl.pltn13.pacbell.net
User-Agent Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.2.0
In-Reply-To <557fa1ab-a8d7-4ef7-bc6f-978f9cba5091@googlegroups.com>
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 <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.12205.1406068877.18130.python-list@python.org> (permalink)
Lines 22
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1406068877 news.xs4all.nl 2864 [2001:888:2000:d::a6]:41944
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:75038

Show key headers only | View raw


On 07/22/2014 03:31 PM, fl wrote:

> I have a new question on the code. When I run it in a file on PythonWin, 'mylist'
> does not echo anything on the screen. While I enter the command line by line,
> 'mylist' shows the result:
>
>>>> mylist
> [0, 1]
>
>
> What mechanism is involved?


As a convenience, the interactive prompt environment will display the 
value of a variable when entered on its own.

In scripts, you'd usually want to use print.

Emile


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


Thread

Question about Pass-by-object-reference? fl <rxjwg98@gmail.com> - 2014-07-22 12:04 -0700
  Re: Question about Pass-by-object-reference? Ned Batchelder <ned@nedbatchelder.com> - 2014-07-22 15:32 -0400
    Re: Question about Pass-by-object-reference? fl <rxjwg98@gmail.com> - 2014-07-22 12:54 -0700
  Re: Question about Pass-by-object-reference? fl <rxjwg98@gmail.com> - 2014-07-22 12:34 -0700
    Re: Question about Pass-by-object-reference? Peter Pearson <ppearson@nowhere.invalid> - 2014-07-22 20:35 +0000
      Re: Question about Pass-by-object-reference? emile <emile@fenx.com> - 2014-07-22 13:46 -0700
        Re: Question about Pass-by-object-reference? fl <rxjwg98@gmail.com> - 2014-07-22 15:17 -0700
          Re: Question about Pass-by-object-reference? Joel Goldstick <joel.goldstick@gmail.com> - 2014-07-22 18:26 -0400
          Re: Question about Pass-by-object-reference? emile <emile@fenx.com> - 2014-07-22 15:33 -0700
          Re: Question about Pass-by-object-reference? Jerry Hill <malaclypse2@gmail.com> - 2014-07-22 19:06 -0400
        Re: Question about Pass-by-object-reference? fl <rxjwg98@gmail.com> - 2014-07-22 15:31 -0700
          Re: Question about Pass-by-object-reference? emile <emile@fenx.com> - 2014-07-22 15:40 -0700
      Re: Question about Pass-by-object-reference? fl <rxjwg98@gmail.com> - 2014-07-22 16:00 -0700
        Re: Question about Pass-by-object-reference? emile <emile@fenx.com> - 2014-07-22 16:10 -0700
  Re: Question about Pass-by-object-reference? Terry Reedy <tjreedy@udel.edu> - 2014-07-22 20:27 -0400
    Re: Question about Pass-by-object-reference? fl <rxjwg98@gmail.com> - 2014-07-22 18:49 -0700
      Re: Question about Pass-by-object-reference? Ben Finney <ben+python@benfinney.id.au> - 2014-07-23 11:59 +1000
        Re: Question about Pass-by-object-reference? Steven D'Aprano <steve@pearwood.info> - 2014-07-23 05:35 +0000
          Re: Question about Pass-by-object-reference? Chris Angelico <rosuav@gmail.com> - 2014-07-23 16:07 +1000
          Re: Question about Pass-by-object-reference? Ben Finney <ben+python@benfinney.id.au> - 2014-07-23 16:25 +1000
          Re: Question about Pass-by-object-reference? Terry Reedy <tjreedy@udel.edu> - 2014-07-23 18:51 -0400
            Re: Question about Pass-by-object-reference? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-07-24 03:22 +0000
              Re: Question about Pass-by-object-reference? Steven D'Aprano <steve@pearwood.info> - 2014-07-24 05:05 +0000
    Re: Question about Pass-by-object-reference? Steven D'Aprano <steve@pearwood.info> - 2014-07-23 05:36 +0000
      Re: Question about Pass-by-object-reference? Terry Reedy <tjreedy@udel.edu> - 2014-07-23 18:32 -0400
    Re: Question about Pass-by-object-reference? alex23 <wuwei23@gmail.com> - 2014-07-25 15:20 +1000
  Re: Question about Pass-by-object-reference? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-07-23 01:56 +0000

csiph-web