Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #90628 > unrolled thread
| Started by | Skip Montanaro <skip.montanaro@gmail.com> |
|---|---|
| First post | 2015-05-14 13:55 -0500 |
| Last post | 2015-05-14 13:55 -0500 |
| 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.
Re: a python pitfall Skip Montanaro <skip.montanaro@gmail.com> - 2015-05-14 13:55 -0500
| From | Skip Montanaro <skip.montanaro@gmail.com> |
|---|---|
| Date | 2015-05-14 13:55 -0500 |
| Subject | Re: a python pitfall |
| Message-ID | <mailman.15.1431629731.17265.python-list@python.org> |
> 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.... Pylint (and perhaps other Python "linters") would, I think, warn you that you were using a mutable object as a default. It's more obvious that the list is being reused if you call foo with different values each time. Skip
Back to top | Article view | comp.lang.python
csiph-web