[BangPypers] An interesting beginner post at Stackoverflow

Roshan Mathews rmathews at gmail.com
Wed Oct 21 08:42:10 CEST 2009

On Wed, Oct 21, 2009 at 12:05 PM, Sidharth Kuruvila
<sidharth.kuruvila at gmail.com> wrote:
>  d = {"a":"Hello"}
>  print d.setdefault("a", "blah")
>  Even though the string blah is not being used an object has to be
> created to represent it. Even worse, you could put some complex
> expression in there expecting it to evaluate only if the key is
> missing.
Oh, alright.

Roshan Mathews

More information about the BangPypers mailing list