? 'in' operator and fallback to __getitem__

2009-05-18 Thread timh
Hi I am trying to understand something about how the 'in' operator (as in the following expression) if 'aa' in x: do_something() When trying to implement in support on a class it appears that if __contains__ doesn't exist in falls back to calling __getitem__ However strange things happen to

Re: Coming from .NET and VB and C

2008-09-08 Thread timh
Hi What do you mean by a 3% performance hit? And compared to what ? Any performance hit or for that matter a performance improvement would very much dependant on the problem domain , how it maps to the data store and what you are trying to do with it, and your choice of algorithms. T On Sep 9,

Re: How do *you* use Python in non-GUI work?

2008-05-18 Thread timh
On May 19, 6:20 am, John Salerno <[EMAIL PROTECTED]> wrote: > Hey all. Just thought I'd ask a general question for my own interest. Every > time I think of something I might do in Python, it usually involves creating > a GUI interface, so I was wondering what kind of work you all do with Python