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


Groups > comp.lang.python > #90630 > unrolled thread

Re: a python pitfall

Started byIan Kelly <ian.g.kelly@gmail.com>
First post2015-05-14 13:48 -0600
Last post2015-05-14 13:48 -0600
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: a python pitfall Ian Kelly <ian.g.kelly@gmail.com> - 2015-05-14 13:48 -0600

#90630 — Re: a python pitfall

FromIan Kelly <ian.g.kelly@gmail.com>
Date2015-05-14 13:48 -0600
SubjectRe: a python pitfall
Message-ID<mailman.17.1431632962.17265.python-list@python.org>
On Thu, May 14, 2015 at 12:06 PM, Billy Earney <billy.earney@gmail.com> wrote:
> Hello friends:
>
> I saw the following example at
> http://nafiulis.me/potential-pythonic-pitfalls.html#using-mutable-default-arguments
> and did not believe the output produced and had to try it for myself....

See also https://docs.python.org/3/faq/programming.html#why-are-default-values-shared-between-objects

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web