Re: [BangPypers] strange behavior

2008-07-09 Thread Pradeep Gowda
On Jul 10, 2008, at 12:54 AM, Gopal Ghosh wrote: * >>> 7/3 2 >>> 7/-3 -3 >>> 3/7 0 >>> # again reapting the questions with one more decimal place >>> 7.0/3 2.3335 >>> 7.0/-3 -2.3335 >>> 3.0/7 0.42857142857142855 >>> # why it is not showing the exact

[BangPypers] strange behavior

2008-07-09 Thread Gopal Ghosh
Dear sir / madam I am a new user of python and this is my first mail to local user group of python. I came across a strange behavior pf python n unable to explain it * >>> 7/3 2 >>> 7/-3 -3 >>> 3/7 0 >>> # again reapting the questions with one more decimal place >>> 7.0/3 2.33

Re: [BangPypers] How for and list.remove() works

2008-07-09 Thread Jeff Rush
Anand Chitipothu wrote: On Wed, Jul 9, 2008 at 8:47 PM, Kushal Das <[EMAIL PROTECTED]> wrote: Hi all, a = [12, 12, 1321, 34, 23, 12, 34, 45, 77] for x in a: ... if x == 12: ... a.remove(x) a [1321, 34, 23, 12, 34, 45, 77] Can any one explain me how the remove works and how it is effe

Re: [BangPypers] FW: ActiveState Code: the new Python Cookbook site

2008-07-09 Thread Anand Balachandran Pillai
I noticed it. But surely only in quantity, not in quality :) On Wed, Jul 9, 2008 at 8:30 PM, O.R.Senthil Kumaran <[EMAIL PROTECTED]> wrote: > * scriptor Anand Balachandran Pillai, explico >> ASPN cookbook site was up for a new look and feel for quite some time. >> The old site is still in Web 1.0

Re: [BangPypers] How for and list.remove() works

2008-07-09 Thread Kushal Das
On Wednesday 09 July 2008 09:26:09 pm Anand Chitipothu wrote: > It never iterated over the second the 12. When x=12 for the last time, > there was still a 12 at the begining of the list. (try printing the > list also for every iteration). > > It internally maintains an index for iteration. If you h

Re: [BangPypers] How for and list.remove() works

2008-07-09 Thread Prashanth
Hi kushal, On Wed, Jul 9, 2008 at 8:47 PM, Kushal Das <[EMAIL PROTECTED]> wrote: > a = [12, 12, 1321, 34, 23, 12, 34, 45, 77] for x in a: > ... if x == 12: > ... a.remove(x) a > [1321, 34, 23, 12, 34, 45, 77] This is not possible in python because when you remove the a[1] th

Re: [BangPypers] How for and list.remove() works

2008-07-09 Thread Anand Chitipothu
On Wed, Jul 9, 2008 at 8:47 PM, Kushal Das <[EMAIL PROTECTED]> wrote: > Hi all, > a = [12, 12, 1321, 34, 23, 12, 34, 45, 77] for x in a: > ... if x == 12: > ... a.remove(x) a > [1321, 34, 23, 12, 34, 45, 77] > > Can any one explain me how the remove works and how it is effectin

Re: [BangPypers] How for and list.remove() works

2008-07-09 Thread Venkatraman S
On Wed, Jul 9, 2008 at 8:47 PM, Kushal Das <[EMAIL PROTECTED]> wrote: > Hi all, > > >>> a = [12, 12, 1321, 34, 23, 12, 34, 45, 77] > >>> for x in a: > ... if x == 12: > ... a.remove(x) > >>> a > [1321, 34, 23, 12, 34, 45, 77] > > Can any one explain me how the remove works and how it is effe

Re: [BangPypers] How for and list.remove() works

2008-07-09 Thread Kushal Das
On Wed, Jul 9, 2008 at 8:47 PM, Kushal Das <[EMAIL PROTECTED]> wrote: > Hi all, > a = [12, 12, 1321, 34, 23, 12, 34, 45, 77] for x in a: > ... if x == 12: > ... a.remove(x) a > [1321, 34, 23, 12, 34, 45, 77] > > Can any one explain me how the remove works and how it is effectin

[BangPypers] How for and list.remove() works

2008-07-09 Thread Kushal Das
Hi all, >>> a = [12, 12, 1321, 34, 23, 12, 34, 45, 77] >>> for x in a: ... if x == 12: ... a.remove(x) >>> a [1321, 34, 23, 12, 34, 45, 77] Can any one explain me how the remove works and how it is effecting the for loop. Kushal -- Fedora Ambassador, India http://kushaldas.in http://dgpl

Re: [BangPypers] FW: ActiveState Code: the new Python Cookbook site

2008-07-09 Thread O.R.Senthil Kumaran
* scriptor Anand Balachandran Pillai, explico > ASPN cookbook site was up for a new look and feel for quite some time. > The old site is still in Web 1.0 without support for tags and the search > is not very good. I had mostly followed new recipes using the Google Reader, so hadn't got a chance

[BangPypers] Issue of return value from dll

2008-07-09 Thread Bejoy M.D
Hi All , We want to access the functions from a c++ dll. This dll is not a COM dll. With this dll function (ISO14229_DiagnosticSessionControl_10) we are able to communicate to the dll but the return for the 4th argument array is always getting as 0. Any solution for this...? iRecLen =