Re: [arch-dev-public] [PATCH 1/3] Use format strings when printing errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Le 27/02/2011 19:25, Dan McGee a écrit :
-		print("Error: " + package + " is empty or is not a valid package")
+		print("Error: %s is empty or is not a valid package" % package)

That method of string formatting is deprecated in python 3. ;)

http://docs.python.org/release/3.1.3/library/stdtypes.html#old-string-formatting
http://docs.python.org/release/3.1.3/library/string.html#string-formatting

--
cantabile

"Jayne is a girl's name." -- River


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux