Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

So basically Perl autovivification for Python?


Seems a subset of it. Practicality aside, Perl can autovivify not only hashes but also arrays:

  my %x;
  $x{foo}[1]{bar} = 42;  # %x is ( foo => [ undef, { bar => 42 } ] )




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: