On Mon, 09 May 2005 10:54:22 -0400, Jeremy Jones <[EMAIL PROTECTED]> wrote:
>I've written a piece of code that iterates through a list of items and
>determines the filename to write some piece of data to based on
>something in the item itself. Here is a small example piece of code to
>show the ty
Fredrik Lundh wrote:
Jeremy Jones wrote:
#
file_dict = {}
a_list = [("a", "a%s" % i) for i in range(2500)]
b_list = [("b", "b%s" % i) for i in range(2500)]
c_list = [("c", "c%s" % i) for i in range(2500)]
d_list = [("d", "d%s" % i) for i in range(2
Fredrik Lundh wrote:
> you do realize that this opens the file again every time, so you end
> up having 4x2500 file handles pointing to 4 physical files. that's a
> bad idea.
>
Assuming he is using the common C Python most of those file handles get
closed immediately after opening, so he never
Jeremy Jones wrote:
> Here is a small example piece of code to
> show the type of thing I'm doing::
>
> #
> file_dict = {}
>
> a_list = [("a", "a%s" % i) for i in range(2500)]
> b_list = [("b", "b%s" % i) for i in range(2500)]
> c_list = [("c", "c%s" % i) for i in
Jeremy Jones wrote:
> #
> file_dict = {}
>
> a_list = [("a", "a%s" % i) for i in range(2500)]
> b_list = [("b", "b%s" % i) for i in range(2500)]
> c_list = [("c", "c%s" % i) for i in range(2500)]
> d_list = [("d", "d%s" % i) for i in range(2500)]
>
>
> joined_list =
I've written a piece of code that iterates through a list of items and
determines the filename to write some piece of data to based on
something in the item itself. Here is a small example piece of code to
show the type of thing I'm doing::
#
file_dict = {}
a_list