No tym som si prave neni isty, pretoze na http://docs.python.org/whatsnew/2.6.html sa pise: "In Python 3.0, the % operator is supplemented by a more powerful string formatting method, format()..." Takze neviem, ci bude %-operator existovat sucasne s funkciou format().
Re: [python] python 2.6 released Tomas Brabenec to: Konference PyCZ 06.10.2008 07:53 Sent by: [EMAIL PROTECTED] Please respond to Konference PyCZ Já teda nevim, ale mohlo by to byt preci takhle: print(""" spam='%s' egs='%s' """ % (spam,egs)) Nebo se pletu ? Tomas On 4.10.2008 21:03, [EMAIL PROTECTED] wrote: > V Pythone 2.6 by mali byt uz k dispozicii funkcie print() a format() > Ak uz to mate nainstalovane a mate s tym skusenosti, ako sa urobi v > buducnosti napriklad toto?: > print " spam='%s' egs='%s'" % (spam, eggs) > Ja som to pochopil podla http://docs.python.org/whatsnew/2.6.html tak, > ze sa to bude musiet zapisovat bud cez pozicne argumenty nejako takto > print (" spam='{0}' egs='{1}'".format(spam, eggs)) > alebo, cez pomenovane argumenty asi takto > print (" spam='{spam}' egs='{eggs}'".format(spam=spam, eggs=eggs)) > Vyzera to o dost zlozitejsie ako povodny zapis :-) > [EMAIL PROTECTED] wrote: ----- > > To: Konference PyCZ <python@py.cz> > From: Pavel Kosina <[EMAIL PROTECTED]> > Sent by: [EMAIL PROTECTED] > Date: 02.10.2008 18:21 > Subject: [python] python 2.6 released > > Asi jdu s křížkem po funuse, protože všechny hlavní portály o tom již > informovali: Python 2.6 je vydán. > Python 2.6 je spíše takovou dočasnou přechodkou mezi 2.5 a 3.0, > jak píše > A.M. Kuchling: > > The major theme of Python 2.6 is preparing the migration path to > Python > 3.0, a major redesign of the language. Whenever possible, Python 2.6 > incorporates new features and syntax from 3.0 while remaining > compatible > with existing code by not removing older features or syntax. When > it’s > not possible to do that, Python 2.6 tries to do what it can, adding > compatibility functions in a future_builtins > <http://docs.python.org/library/future_builtins.html> module and a > /-3/ > <http://docs.python.org/using/cmdline.html#cmdoption-3> switch to > warn > about usages that will become unsupported in 3.0. > > http://docs.python.org/whatsnew/2.6.html > http://www.python.org/download/ > > -- > geon > Pavel Kosina > > _______________________________________________ > Python mailing list > Python@py.cz > http://www.py.cz/mailman/listinfo/python > > > ------------------------------------------------------------------------ > > _______________________________________________ > Python mailing list > Python@py.cz > http://www.py.cz/mailman/listinfo/python _______________________________________________ Python mailing list Python@py.cz http://www.py.cz/mailman/listinfo/python
_______________________________________________ Python mailing list Python@py.cz http://www.py.cz/mailman/listinfo/python