1 |
On Thu, Feb 12, 2009 at 7:01 PM, René 'Necoro' Neumann <lists@××××××.eu> wrote: |
2 |
> Hash: SHA1 |
3 |
> |
4 |
> Brian Harring schrieb: |
5 |
>> On Wed, Feb 11, 2009 at 11:10:43PM -0800, Alec Warner wrote: |
6 |
>>> belongs.py has this gem: |
7 |
>>> q.append(('^' if query[0] == '/' else '/') + re.escape(query) + '$') |
8 |
>> Also a python2.6 only feature... |
9 |
>> ~brian |
10 |
> |
11 |
> python-2.5 it is ... |
12 |
|
13 |
Yep, this python ternary syntax was introduced in 2.5. I'm using quite |
14 |
a few >=2.5 features... |
15 |
* the new ternary syntax |
16 |
* passing a tuple to str.startswith |
17 |
* with statement |
18 |
* max( key=...) |
19 |
|
20 |
Again, there are a lot of version of gentoolkit in the tree, so I |
21 |
didn't foresee this being a problem. |
22 |
|
23 |
-Doug |