On Fri, Jun 7, 2013 at 1:54 AM, MRAB wrote:
> On 06/06/2013 16:37, Chris Angelico wrote:
>>
>> On Thu, Jun 6, 2013 at 10:14 PM, Dave Angel wrote:
>>>
>>> If you're planning on having the files densely populated (meaning no gaps
>>> in
>>> the numbering), then you could use a binary search to find
On 06/06/2013 16:37, Chris Angelico wrote:
On Thu, Jun 6, 2013 at 10:14 PM, Dave Angel wrote:
If you're planning on having the files densely populated (meaning no gaps in
the numbering), then you could use a binary search to find the last one.
Standard algorithm would converge with 10 existence
On Thu, Jun 6, 2013 at 10:14 PM, Dave Angel wrote:
> If you're planning on having the files densely populated (meaning no gaps in
> the numbering), then you could use a binary search to find the last one.
> Standard algorithm would converge with 10 existence checks if you have a
> limit of 1000 fi
Avnesh Shakya writes:
> I am running a python script and it will create a file name like
> filename0.0.0 and If I run it again then new file will create one
> more like filename0.0.1.. my code is-
>
> i = 0
> for i in range(1000):
> try:
> with open('filename%d.%d.%d.json'%(0,0,i,
On 06/06/2013 06:50 AM, Avnesh Shakya wrote:
hi,
I am running a python script and it will create a file name like
filename0.0.0 and If I run it again then new file will create one more like
filename0.0.1.. my code is-
i = 0
Redundant initialization of i.
for i in range(1000):
Thanks.
On Thu, Jun 6, 2013 at 4:49 PM, Cameron Simpson wrote:
> On 06Jun2013 03:50, Avnesh Shakya wrote:
> | hi,
> |I am running a python script and it will create a file name like
> filename0.0.0 and If I run it again then new file will create one more like
> filename0.0.1.. my code
On 06Jun2013 03:50, Avnesh Shakya wrote:
| hi,
|I am running a python script and it will create a file name like
filename0.0.0 and If I run it again then new file will create one more like
filename0.0.1.. my code is-
|
| i = 0
| for i in range(1000):
| try:
| with open('file
hi,
I am running a python script and it will create a file name like
filename0.0.0 and If I run it again then new file will create one more like
filename0.0.1.. my code is-
i = 0
for i in range(1000):
try:
with open('filename%d.%d.%d.json'%(0,0,i,)): pass
continue