equal
deleted
inserted
replaced
123 '''Construct a part of a pathname, without slashes.''' |
123 '''Construct a part of a pathname, without slashes.''' |
124 |
124 |
125 p = pickfrom(rng, firsttable)(rng) |
125 p = pickfrom(rng, firsttable)(rng) |
126 l = len(p) |
126 l = len(p) |
127 ps = [p] |
127 ps = [p] |
128 while l < k: |
128 maxl = rng.randint(1, k) |
|
129 while l < maxl: |
129 p = pickfrom(rng, resttable)(rng) |
130 p = pickfrom(rng, resttable)(rng) |
130 l += len(p) |
131 l += len(p) |
131 ps.append(p) |
132 ps.append(p) |
132 ps.append(pickfrom(rng, lasttable)(rng)) |
133 ps.append(pickfrom(rng, lasttable)(rng)) |
133 return ''.join(ps) |
134 return ''.join(ps) |