Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #99840
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Erik <python@lucidity.plus.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: static variables |
| Date | Wed, 2 Dec 2015 01:16:37 +0000 |
| Lines | 18 |
| Message-ID | <mailman.97.1449019041.14615.python-list@python.org> (permalink) |
| References | <n3i06o$9ot$1@news2.informatik.uni-stuttgart.de> <n3ibkd$nl0$1@dont-email.me> <565cf163$0$1612$c3e8da3$5496439d@news.astraweb.com> <n3jljn$os2$1@news2.informatik.uni-stuttgart.de> <n3joag$v4e$1@dont-email.me> <565e4329$0$1612$c3e8da3$5496439d@news.astraweb.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=windows-1252; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | news.uni-berlin.de PwFtvkBuWX+tovOgxJ+b/wyvxV1GtqBAJyexsfQxh5nA== |
| Return-Path | <python@lucidity.plus.com> |
| 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; 'static': 0.03; 'caller': 0.07; 'override': 0.07; 'mutable': 0.09; 'storage.': 0.09; 'def': 0.13; '"private"': 0.16; 'from:addr:python': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'thread.': 0.16; 'to:addr:pearwood.info': 0.16; "to:name:steven d'aprano": 0.16; 'wrote:': 0.16; '>>>': 0.20; '2015': 0.20; 'to:2**1': 0.21; 'dec': 0.23; 'header:In-Reply-To:1': 0.24; 'skip:- 40': 0.25; 'header :User-Agent:1': 0.26; 'print': 0.30; "d'aprano": 0.33; 'steven': 0.33; 'tue,': 0.34; 'something': 0.35; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:192': 0.39; 'to:addr:python.org': 0.40; 'default': 0.61; 'charset:windows-1252': 0.62; 'local,': 0.84; 'exposing': 0.91 |
| X-CM-Score | 0.00 |
| X-CNFS-Analysis | v=2.1 cv=bI7rW6KZ c=1 sm=1 tr=0 a=Ypmeq7T0cKALDUsRPCToMg==:117 a=Ypmeq7T0cKALDUsRPCToMg==:17 a=0Bzu9jTXAAAA:8 a=EBOSESyhAAAA:8 a=N659UExz7-8A:10 a=sTL1cM5qazUn-utOV4EA:9 a=pILNOxqGKmIA:10 |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
| In-Reply-To | <565e4329$0$1612$c3e8da3$5496439d@news.astraweb.com> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.20+ |
| 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> |
| Xref | csiph.com comp.lang.python:99840 |
Show key headers only | View raw
On 02/12/15 01:02, Steven D'Aprano wrote: > On Tue, 1 Dec 2015 08:15 pm, Grobu wrote: >> # ------------------------------------------------- >> >>> def test(arg=[0]): >> ... print arg[0] >> ... arg[0] += 1 > Awesome! Hideous! > using a mutable default as static storage. Exposing something a caller can override as a local, static, supposedly "private" value is IMHO a tad ... ugly? (*) E. (*) No I don't want to resurrect that thread.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
static variables Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2015-11-30 17:15 +0000
Re: static variables Terry Reedy <tjreedy@udel.edu> - 2015-11-30 12:38 -0500
Re: static variables BartC <bc@freeuk.com> - 2015-11-30 20:32 +0000
Re: static variables Steven D'Aprano <steve@pearwood.info> - 2015-12-01 12:01 +1100
Re: static variables Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2015-12-01 08:26 +0000
Re: static variables Peter Otten <__peter__@web.de> - 2015-12-01 10:01 +0100
Re: static variables Grobu <snailcoder@retrosite.invalid> - 2015-12-01 10:15 +0100
Re: static variables Steven D'Aprano <steve@pearwood.info> - 2015-12-02 12:02 +1100
Re: static variables Erik <python@lucidity.plus.com> - 2015-12-02 01:16 +0000
Re: static variables Steven D'Aprano <steve@pearwood.info> - 2015-12-02 12:24 +1100
Re: static variables Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-12-02 09:21 +0100
Re: static variables Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-12-02 09:34 +0100
Re: static variables Steven D'Aprano <steve@pearwood.info> - 2015-12-02 21:22 +1100
Re: static variables Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-12-02 12:09 +0100
Re: static variables Steven D'Aprano <steve@pearwood.info> - 2015-12-03 00:11 +1100
Re: static variables Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-12-02 14:41 +0100
Re: static variables Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-12-02 13:48 +0000
Re: static variables Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-12-02 15:07 +0100
Re: static variables Ian Kelly <ian.g.kelly@gmail.com> - 2015-12-02 08:15 -0600
Re: static variables Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-12-02 14:31 +0000
Re: static variables Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-12-02 16:30 +0100
Re: static variables Ian Kelly <ian.g.kelly@gmail.com> - 2015-12-02 14:30 -0600
Re: static variables Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-12-03 10:06 +0100
Re: static variables Chris Angelico <rosuav@gmail.com> - 2015-12-02 20:23 +1100
Re: static variables Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-12-02 10:47 +0100
Re: static variables Marko Rauhamaa <marko@pacujo.net> - 2015-12-02 12:18 +0200
Re: static variables Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-12-02 11:56 +0100
Re: static variables Marko Rauhamaa <marko@pacujo.net> - 2015-12-02 13:30 +0200
Re: static variables Steven D'Aprano <steve@pearwood.info> - 2015-12-03 00:17 +1100
Re: static variables Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de> - 2015-12-01 10:58 +0100
Re: static variables Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2015-12-01 11:47 +0000
csiph-web