[Distutils] [Python-Dev] [Python-checkins] peps: PEP 426: replace implied 'version starts with' with new =?utf-8?Q?=7E=3D_?=operator
Donald Stufft
donald.stufft at gmail.com
Wed Feb 27 01:09:53 CET 2013
On Tuesday, February 26, 2013 at 7:06 PM, Chris Jerdonek wrote:
> On Tue, Feb 26, 2013 at 2:08 PM, Donald Stufft <donald.stufft at gmail.com (mailto: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
I happened to still have that console open,
In [49]: len([x for x in releases if any([y for y in x[1].split(".") if y.startswith("0") and y.isdigit() and y != "0"])])
Out[49]: 1236
In [52]: len([x for x in releases if any([y for y in x[1].split(".") if y.startswith("0") and y.isdigit() and int(y) != 0])])
Out[52]: 1177
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20130226/314684d9/attachment.html>
More information about the Distutils-SIG
mailing list