Re: session problem in 0.92dev

2006-08-29 Thread Martin
Thanks as well... I didn't know about that speed difference between key in dict and dict.has_key(key) Good to hear about simple things like this. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss

Re: session problem in 0.92dev

2006-08-28 Thread Jarosław Kulesza
Huy Do wrote: Hi, I'm getting this error when trying to access the session in pylons 0.92. Any ideas ? Thanks File /home/huy/apps/ktrack/ktrack/menu.py, line 32, in menu_client if session.has_key['client_id']: TypeError: unsubscriptable object if session.has_key('client_id'):

Re: session problem in 0.92dev

2006-08-28 Thread Damjan
has_key will be removed in Python3000, use if 'client_id' in session: instead --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to

Re: session problem in 0.92dev

2006-08-28 Thread huydo
Ben Bangert wrote: On Aug 28, 2006, at 3:13 PM, Damjan wrote: has_key will be removed in Python3000, use if 'client_id' in session: instead Also useful to know, this syntax is faster in Python 2.4 then using has_key. Thanks for the tips guys. I've done a global search and replace