On Tuesday, February 26, 2013 at 7:06 PM, Chris Jerdonek wrote:
> On Tue, Feb 26, 2013 at 2:08 PM, Donald Stufft <[email protected] 
> (mailto:[email protected])> 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

_______________________________________________
Distutils-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to