[Moin-user] Billenium bug

Tim Bird tbird at lineo.com
Mon Oct 1 17:12:02 EDT 2001


Adam Shand wrote:
> 
> > +        oldversions = [x[1] for x in oldversions]
> 
> this patch, specifically the line above breaks python 1.5.2 support.  i'm
> not sure if you're interested in supporting older versions but this breaks
> it.

I reworked the patch as follows:

        backup_re = re.compile(r'^%s\.\d+(\.\d+)?$' % (pagename,))
        #oldversions = filter(backup_re.match, os.listdir(backup_dir))
        oldversions = []
        for file in os.listdir(backup_dir):
                if not backup_re.match(file): continue
                data = string.split(file,'.',1)
                oldversions.append(((data[0], float(data[1])),file))
        oldversions.sort()
        oldversions.reverse()
        #oldversions = [x[1] for x in oldversions]

I run MoinMoin on a machine I don't control, and they only
have Python 1.5.2 on it.

I'm conflicted on the 1.5.2 requirement.  I prefer to use
2.0 whenever I can, but sometimes I do not have any control
over this.  The three main areas of syntactic sugar that
appear to be at issue are:
	- list comprehensions
	- augmented assignment
	- builtin string object methods

None of these are particularly difficult to translate
back to Python 1.5.x mechanisms.
____________________________________________________________
Tim Bird                                  Lineo, Inc.
Senior VP, Research                       390 South 400 West
tbird at lineo.com                           Lindon, UT 84042




More information about the Moin-user mailing list