Not sure if this is what you want, but you can nest list display expressions:

>>> [[i for i in xrange(5)] for j in xrange(3)]
[[0, 1, 2, 3, 4], [0, 1, 2, 3, 4], [0, 1, 2, 3, 4]]

Steve

On Mon, Nov 17, 2008 at 10:52 AM, Shoaib Akram <[EMAIL PROTECTED]> wrote:
> Not related to m5 but just asking:
>
> Currently, I have something like:
>
> system.busAB   =[Bus()    for i in xrange(c)]
>
> Now I want, busAB[0], busAB[1] to be not one Bus but, each of form:
>
> [Bus() for i in xrange(c)]
>
> Any idea?
> _______________________________________________
> m5-users mailing list
> [email protected]
> http://m5sim.org/cgi-bin/mailman/listinfo/m5-users
>
_______________________________________________
m5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/m5-users

Reply via email to