Simply because it didn't occur to me. So now I have >>> class A: pass ... >>> d = {A:[A(),A(),A()]} >>> a = d[A].pop() >>> a <__main__.A instance at 0x00F09A58> >>>
Thanks all! /Joakim -- http://mail.python.org/mailman/listinfo/python-list
Simply because it didn't occur to me. So now I have >>> class A: pass ... >>> d = {A:[A(),A(),A()]} >>> a = d[A].pop() >>> a <__main__.A instance at 0x00F09A58> >>>
Thanks all! /Joakim -- http://mail.python.org/mailman/listinfo/python-list