On 25/06/10 16:41, holger krekel wrote:
>> > + def env(self):
>> > + return [(env.lstrip('env:'), value)
>> > + for env, value in
>> > self.gateway.spec.__dict__.iteritems()
>> > + if env.startswith('env:')]
>> >
> You could use env[4:] instead of lstrip() to optimize though :)
using [:4] instead of lstrip is not much about performance, but about
correctness:
>>> 'env:env'.lstrip('env:')
''
ciao,
Anto
_______________________________________________
py-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/py-dev