Trying to choose between python and java

James Matthews nytrokiss at gmail.com
Fri Jul 20 22:07:35 CEST 2007


You can always use jython. ;)

On 7/20/07, rvu44vs02 at sneakemail.com <rvu44vs02 at sneakemail.com> wrote:
>
> On Sun, 15 Jul 2007 at 22:28:08 -0700, Alex Martelli wrote:
> > James T. Dennis <jadestar at idiom.com> wrote:
> >    ...
> > >  You can start writing all your code now as: print() --- calling
> > >  the statement as if it were a function.  Then you're future Python
> >
> > ...except that your output format will thereby become disgusting...:
> >
> > >>> name = 'Alex'
> > >>> print 'Hello', name, 'and welcome to my program!'
> > Hello Alex and welcome to my program!
> > >>> print('Hello', name, 'and welcome to my program!')
> > ('Hello', 'Alex', 'and welcome to my program!')
> >
> > In Python 2.*, the parentheses will make a tuple, and so you'll get an
> > output full of parentheses, quotes and commas.  I think it's pretty bad
> > advice to give a newbie, to make his output as ugly as this.
> >
> >
> > Alex
> > --
>
> One possible kind of print function that might be used in the interim is
> something like:
>
>
> def print_fn(*args):
>     """print on sys.stdout"""
>     arg_str = " ".join([str(x) for x in args])
>     print arg_str
>
> -Jim
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://www.goldwatches.com/watches.asp?Brand=14
http://www.jewelerslounge.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070720/f04945ad/attachment.html>


More information about the Python-list mailing list