They made other compatibility-breaking changes in Python 3, though. It'd be interesting to know why this particular feature was kept. I guess from another point of view it's simpler to have everything in the `def` line executed when that line is reached (which is when the function is defined).
Python 3 is deliberately not backwards compatible. They made several big breaking changes to remove warts.
Re:Python: Common Newbie Mistakes, Part 1
by mixmastamyk on Sunday July 07, 2013 @01:14PM
(#6002593)
I don't know. Scripts have to be somewhat rewritten in Py 3 anyway, I think it would have been a good time to fix it.
There's plenty of code out there that rely on default values being assigned a mutable value and changing it -- even in a major point release -- would be far worse off. Python's been around for 20 years; it's too late to make a change like that.
It IS a "wart" in that you need to be aware of it to know that it's an issue, but once you are, it is an obvious thing to spot.