Re: print a vs print '%s' % a vs print '%f' a

2008-12-29 Thread David Cournapeau
On Tue, Dec 30, 2008 at 12:23 PM, James Mills wrote: > On Tue, Dec 30, 2008 at 1:19 PM, David Cournapeau wrote: > (... snip ...) > >> print '%f' % a # -> print '1.#INF' > > Would this not be controlled by: > 1. float(a) or a.__float__() > 2. tp_print Bah, I made a mistake in my example: complex(

Re: print a vs print '%s' % a vs print '%f' a

2008-12-29 Thread James Mills
On Tue, Dec 30, 2008 at 1:19 PM, David Cournapeau wrote: (... snip ...) > print '%f' % a # -> print '1.#INF' Would this not be controlled by: 1. float(a) or a.__float__() 2. tp_print cheers James -- http://mail.python.org/mailman/listinfo/python-list

print a vs print '%s' % a vs print '%f' a

2008-12-29 Thread David Cournapeau
7;inf') would be printed 'inf', and not '1.#INF'. However, I would like some clarifications if possible about the following: a = complex('inf') print a # -> print 'inf' print '%s' % a # -> print 'inf' print '%f'

Re: print "%s"

2008-08-18 Thread Beema Shafreen
\t%s\t%s\t%s\t' > > - Michael > > On Aug 18, 3:27 am, Bruno Desthuilliers [EMAIL PROTECTED]> wrote: > > Cameron Simpson a écrit : > > > > > > > > > On 18Aug2008 11:58, Beema Shafreen <[EMAIL PROTECTED]> wrote: > > > | In my script i

Re: print "%s"

2008-08-18 Thread gundlach
8Aug2008 11:58, Beema Shafreen <[EMAIL PROTECTED]> wrote: > > | In my script i have to print a series of string , so > > | > > | print "%s\t%s\t%s\t%s\t%s\t%s\t" %("a","v","t","R","s","f") > > | &

Re: print "%s"

2008-08-18 Thread Maric Michaud
Le Monday 18 August 2008 09:27:33 Bruno Desthuilliers, vous avez écrit : > Cameron Simpson a écrit : > > On 18Aug2008 11:58, Beema Shafreen <[EMAIL PROTECTED]> wrote: > > | In my script i have to print a series of string , so > > | > > | print "%s\t%s\t%s\t

Re: print "%s"

2008-08-18 Thread Bruno Desthuilliers
Cameron Simpson a écrit : On 18Aug2008 11:58, Beema Shafreen <[EMAIL PROTECTED]> wrote: | In my script i have to print a series of string , so | | print "%s\t%s\t%s\t%s\t%s\t%s\t" %("a","v","t","R","s","f") | | I need

Re: print "%s"

2008-08-17 Thread Rob Weir
On 18 Aug 2008, Beema Shafreen wrote: > Hi ALL, > > In my script i have to print a series of string , so > > print "%s\t%s\t%s\t%s\t%s\t%s\t" %("a","v","t","R","s","f") print "\t".join(("a&q

Re: print "%s"

2008-08-17 Thread Cameron Simpson
On 18Aug2008 11:58, Beema Shafreen <[EMAIL PROTECTED]> wrote: | In my script i have to print a series of string , so | | print "%s\t%s\t%s\t%s\t%s\t%s\t" %("a","v","t","R","s","f") | | I need to know instead of typing s

print "%s"

2008-08-17 Thread Beema Shafreen
Hi ALL, In my script i have to print a series of string , so print "%s\t%s\t%s\t%s\t%s\t%s\t" %("a","v","t","R","s","f") I need to know instead of typing so many %s can i write %6s in python, as we do in C progm. What a