Re: Can anyone please help me in understanding the following python code

2013-05-30 Thread bhk755
Got It!!!, Finally. Thanks Dave So, the control goes back to the place after the recursive function is called once the no. of element is equal to one and starts merging after which it will again start to split the remaining items. Thank you Chris for your multiple explanations. One final q

Re: Can anyone please help me in understanding the following python code

2013-05-30 Thread bhk755
Got It!!!, Finally. Thanks Dave So, the control goes back to the place after the recursive function is called once the no. of element is equal to one and starts merging after which it will again start to split the remaining items. Thank you Chris for your multiple explanations. It was also ve

Re: Can anyone please help me in understanding the following python code

2013-05-30 Thread bhk755
Thanks Chris, Wolfgang and Joshua for your replies. In step 2b, all the steps from 1 through 3 are executed again (twice). Soon, those calls will just output "Splitting" followed by "Merging"; and then we go back to 2c. That's why it *seems* that the code goes from

Re: Can anyone please help me in understanding the following python code

2013-05-30 Thread bhk755
On Thursday, May 30, 2013 6:09:20 PM UTC+5:30, bhk...@gmail.com wrote: > Thanks Chris, Wolfgang and Joshua for your replies. > > > > --- > > In step 2b, all the steps from 1 through 3 are executed again (twice). > > Soon, those calls will just output "Splitting" followed by "Merging"; > > a

Re: Can anyone please help me in understanding the following python code

2013-05-30 Thread bhk755
On Thursday, May 30, 2013 6:09:20 PM UTC+5:30, bhk...@gmail.com wrote: > Thanks Chris, Wolfgang and Joshua for your replies. > > > > --- > > In step 2b, all the steps from 1 through 3 are executed again (twice). > > Soon, those calls will just output "Splitting" followed by "Merging"; > > a

Re: Can anyone please help me in understanding the following python code

2013-05-30 Thread bhk755
Thanks Chris, Wolfgang and Joshua for your replies. --- In step 2b, all the steps from 1 through 3 are executed again (twice). Soon, those calls will just output "Splitting" followed by "Merging"; and then we go back to 2c. That's why it *seems* that the code goes from 3 to 2c. You'll notice th

Re: Can anyone please help me in understanding the following python code

2013-05-30 Thread bhk755
Thanks for the reply Chris. I am newbie to python, so please excuse me if I am asking chilly questions. Can you please explain more about the following sentence. "When it says "Splitting" with a single-element list, it then immediately prints "Merging" and returns (because all the rest of the c

Can anyone please help me in understanding the following python code

2013-05-30 Thread bhk755
Code : - def mergeSort(alist): print("Splitting ",alist) if len(alist)>1: mid = len(alist)//2 lefthalf = alist[:mid] righthalf = alist[mid:] mergeSort(lefthalf) mergeSort(righthalf) i=0 j=0 k=0 while ihttp://mail.

Re: Can anyone please help me in resolving the error => AttributeError: Array instance has no attribute '__trunc__'

2013-04-09 Thread bhk755
Awesome Peter!!!. Thanks a lot for detailed explanation... -- http://mail.python.org/mailman/listinfo/python-list

Re: Can anyone please help me in resolving the error => AttributeError: Array instance has no attribute '__trunc__'

2013-04-09 Thread bhk755
Awesome!!! Thanks a lot Peter. -- http://mail.python.org/mailman/listinfo/python-list

Re: Can anyone please help me in resolving the error => AttributeError: Array instance has no attribute '__trunc__'

2013-04-08 Thread bhk755
Thanks Steven for pointing that out. This is my first topic in Google Groups. So, I did not notice that the previous contents will also be taken in the new post. -- http://mail.python.org/mailman/listinfo/python-list

Re: Can anyone please help me in resolving the error => AttributeError: Array instance has no attribute '__trunc__'

2013-04-08 Thread bhk755
Hi Dylan, Thank you for the alternative solution. I will look into that. -- http://mail.python.org/mailman/listinfo/python-list

Re: Can anyone please help me in resolving the error => AttributeError: Array instance has no attribute '__trunc__'

2013-04-08 Thread bhk755
On Monday, April 8, 2013 3:37:38 PM UTC+5:30, bhk...@gmail.com wrote: > I am trying to create 2D arrays without using advanced features like numpy, > for this I have created 2 separate modules arrays.py and array2D.py. Here's > the code for that: > > > > arrays.py module: > >

Can anyone please help me in resolving the error => AttributeError: Array instance has no attribute '__trunc__'

2013-04-08 Thread bhk755
I am trying to create 2D arrays without using advanced features like numpy, for this I have created 2 separate modules arrays.py and array2D.py. Here's the code for that: arrays.py module: == import ctypes class Array: #Creates an array with size elements. def __init__( sel