On Dec 23, 6:10 pm, Robert Kern <robert.k...@gmail.com> wrote: > On 12/23/11 10:22 AM, rusi wrote: > > > > > > > > > > > On Dec 23, 2:39 pm, Steven D'Aprano<steve > > +comp.lang.pyt...@pearwood.info> wrote: > >> On Fri, 23 Dec 2011 00:38:07 -0800, rusi wrote: > >>> Likewise function arguments that default to mutable entities is a known > >>> gotcha of python which is best treated as a bug in python. > > >> Nonsense. It is a feature, not a bug. > > > Tsk Tsk How can python have a bug? And that too on the python mailing > > list? > > > Others however feel differently. See Chris Rebert's > >http://mail.python.org/pipermail/python-ideas/2007-January/000073.html > > and the links cited there. > > >> Some people might argue that it is a mistake, a minor feature which > >> allegedly causes more difficulties than benefits. I do not hold with that > >> idea. But either way, it is not a bug to be fixed, but a deliberate > >> consequence of intended semantics. > > > I did not ask or imply that it should be 'fixed', just that language > > misfeatures should be treated with extra care. > > "Bug" means, roughly, "something that should be fixed" not just any "thing > that > has some unwanted consequences". So yes, by calling it a bug you are asking > and > implying just that. If you don't mean that, don't use the word "bug".
Of course it should be fixed. The repeated recurrence of it as a standard gotcha as well as the python ideas list testifies to that. Its not going to be fixed -- does not mean thats ideal, just that the best proposed solutions cost/benefit equations are not good enough at this point. Case in point: I think it was around python 2.2 that there were discussions for having a conditional operator. GvR did not put it in for a couple of releases not because it was a bad idea but because no syntax was good enough. When he finally did it, he chose a syntax which is arguably not ideal but is the best all-things-considered (eg no unnecessary new keywords, compatibility with existing code etc) -- http://mail.python.org/mailman/listinfo/python-list