[Distutils] [RFC] PEP 345 and PEP 386 updates
Tarek Ziadé
ziade.tarek at gmail.com
Tue Oct 20 22:23:55 CEST 2009
On Tue, Oct 20, 2009 at 10:20 PM, Eric Smith <eric at trueblade.com> wrote:
> Tarek Ziadé wrote:
>>
>> but, notice that "python_version" here is: "%s.%s" %
>> sys.version_info[0], sys.version_info[1]
>
> I think you mean:
> "{0[0]}.{0[1]}".format(sys.version_info)
> or better:
> "{0.major}.{0.minor}".format(sys.version_info)
>
> :)
> On the odd occasion that .format is less verbose than %, I like pointing it
> out!
Ah yes, that's nicer :)
More information about the Distutils-SIG
mailing list