[web2py] Reasoning behind "dict objects", such as request.vars, session, etc

2014-09-06 Thread Robin Manoli
Hey, It is much more clean to write *session.var* than *session['var']* when I can, as well as *if session.var* instead of *if hasattr(session, 'var')*, and I would like to use this style of coding generally in python, if it can remain pythonic. I've been looking into using classes to store va

Re: [web2py] Reasoning behind "dict objects", such as request.vars, session, etc

2014-09-06 Thread Marin Pranjić
Hi! The whole "pythonic or not pythonic" is silly IMO. Python gives us freedom. Yes, you can do stupid things, but this feature is cool and useful, so why not? And "it's not pythonic" is not an argument at all. They should point out bad things that could happen. Maybe there are some bad edge cases