7 Mar
2007
7 Mar
'07
10:14 p.m.
On 3/7/07, Ron Adam
The example from above could then be...
>>> data = [[1, 2, 3, 4], [5, 6, 7, 8], 9, 10] >>> a, b, c, d, e, f, g = "[[,,*],[,,*],*]" %% data
>>> print a, b, c, d, e, f, g 1 2 [3, 4] 5 6 [7, 8] [9, 10]
...
>>> data = [[1, 2, 3, 4], [5, 6, 7, 8], 9, 10] >>> a, b, c, d = ",,,*" %% "[,[],,]" %% data >>> print a, b, c, d [1, 2, 3, 4] 5 6 [7, 8, 9, 10]
...
This type of abstraction may make it easier to interface different types of objects and data structures dynamically.
I can see how this might be made efficient. I'm not seeing how I could ever maintain code that used it. -jJ