[Python-ideas] Documenting Python warts

Oleg Broytman phd at phdru.name
Wed Jan 2 04:12:01 CET 2013


On Wed, Jan 02, 2013 at 11:34:47AM +1100, Chris Angelico <rosuav at gmail.com> wrote:
> Whichever way mutable objects in default args are handled, there are
> going to be strangenesses. Therefore the best thing to do is (almost
> certainly) the simplest.

   And the simples thing would be... let me think... forbid mutable
defaults altogether? Or may be make them read-only?
   Current implementation is the simplest from the implementation point
of view, but it requires additional documentation, especially for novice
users. Is it really the simplest?

Oleg.
-- 
     Oleg Broytman            http://phdru.name/            phd at phdru.name
           Programmers don't die, they just GOSUB without RETURN.



More information about the Python-ideas mailing list