Conversation
Notices
-
Did you guys know that default args (including mutables) are created on definition? I thought I was tripping. http://goo.gl/I3WB !python
Tuesday, 13-Jul-10 02:13:45 UTC from pino-
@amrhassan yes, that's why [] as a default value for an argument sucks :-)
-
@ralsina [] or any list, for that matter? It's Fortran redefining
-
@ralsina [] or any list, for that matter? It's Fortran redefining "4" all over again?
-
@fheinz any mutable type instance, really.
-
@ralsina kinda fun, actually: http://is.gd/dpPsP
-
@fheinz once you know about it, you just use None instead :-)
-