[Distutils] [Python-Dev] [Python-checkins] peps: PEP 426: replace implied 'version starts with' with new ~= operator

Chris Jerdonek chris.jerdonek at gmail.com
Wed Feb 27 01:06:18 CET 2013


On Tue, Feb 26, 2013 at 2:08 PM, Donald Stufft <donald.stufft at gmail.com> wrote:
> In [45]: l = [x for x in releases if any([y for y in x[1].split(".") if
> y.startswith("0") and y.isdigit() and not y.endswith("0")])]
>
> In [46]: len(l)
> Out[46]: 1162
>
> Note this doesn't check if they have confusing versions, (e.g. 1.1 and 1.01)
> just if they
> have a segment with a leading 0.

Thanks.  Probably not worth doing again, but should the last part be y
!= "0" to include cases like "010" and "00"?

--Chris


More information about the Distutils-SIG mailing list