Charles Merriam wrote: > On Wed, Mar 26, 2008 at 9:33 PM, Talin <[EMAIL PROTECTED]> wrote: > ... >> For new code, however, there is an alternative strategy that doesn't >> involve 2to3 at all, which is to write code in the "greatest common >> subset" of 2.6 and 3.0. >> >> As Lennart Regbro pointed out earlier, this common subset is actually >> quite large (larger than Guido originally intended, I think), and you >> can write some fairly substantial applications in it. > > Ok, I'll bite. How can I write the greatest common denominator of this code: > print "Hello World!" # yes, that needs to be Unicode.
# This code will run on both 2.6 and 3.0 # And the string will be Unicode in both from __future__ import unicode_literals print "Hello World!" Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --------------------------------------------------------------- http://www.boredomandlaziness.org _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com