Re: Python for Visual Basic or C# programmers

2006-06-02 Thread Chris Lambacher
On Fri, Jun 02, 2006 at 10:26:28AM +0200, Laurent Pointal wrote: > A.M a ?crit : > > Hi, > > > > > > > > I am trying to find the equivalent functions such as vb's str or asc in > > Python. Is there any resource that help me to find these kinds of functions > > in Python faster? > > > > I'v

Re: Python for Visual Basic or C# programmers

2006-06-02 Thread Laurent Pointal
A.M a écrit : > Hi, > > > > I am trying to find the equivalent functions such as vb's str or asc in > Python. Is there any resource that help me to find these kinds of functions > in Python faster? I've written the PQRC for that purpose: http://www.limsi.fr/Individu/pointal/python/pqrc/

Re: Python for Visual Basic or C# programmers

2006-06-01 Thread Max
Metalone wrote: > > This might be a little too tricky. > [" %d", "%d][n < 0] % n --> selects list[0] or list[1] based upon sign > of number > ("%+d" % 123).replace("+", " ") is slightly longer but instantly comprehensible, although I for one think your boolean indexing trick is cool. --Max

Re: Python for Visual Basic or C# programmers

2006-06-01 Thread Metalone
Slight correction. " %d" % 123 is not quite equivalent to str(123) as it does not handle negative numbers the same way. I am not sure there is a simple direct equivalent. "%+d" % 123 --> "+123" always gives a sign. "%4d" % 123 --> " 123" "%4d" % -123 --> "-123" so this works if you you know how wi

Re: Python for Visual Basic or C# programmers

2006-06-01 Thread Kent Johnson
A.M wrote: > I am trying to find the equivalent functions such as vb's str or asc in > Python. Is there any resource that help me to find these kinds of functions > in Python faster? The Library Reference has a section on built-in functions: http://docs.python.org/lib/built-in-funcs.html Also

Re: Python for Visual Basic or C# programmers

2006-06-01 Thread Metalone
A.M wrote: > Hi, > > > > I am trying to find the equivalent functions such as vb's str or asc in > Python. Is there any resource that help me to find these kinds of functions > in Python faster? > > > > Thank you, > > Alan > > Alan Python has a str() function that is close to vb's str. The Pyth