On Mon, Mar 8, 2010 at 7:53 PM, Aydın ŞEN <[email protected]> wrote: > 2010/3/8 Branko Vukelic <[email protected]> >> if logged(): >> do sth >> >> and >> >> if session.login: >> do sth >> >> is pretty much the same, yeah? Cause, from the snipped above, I'd >> assume the false login status would be 0, which == False. >> > i didn't look at the example, my guess was about snipped logged() func. in > this scenario you are right, a logged() function is redundant.
Yeah. So basically, this can be tweaked beyond ``def logged(): return self.login``, whereas the original also doesn't seem wrong in any way. It's just a few more redundant lines of code that work, and do not get in the way of making the point about logging in... just my 2c -- Branko Vukelić http://foxbunny.tumblr.com/ http://www.flickr.com/photos/16889...@n04/ http://www.twitter.com/foxbunny http://github.com/foxbunny -- You received this message because you are subscribed to the Google Groups "web.py" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/webpy?hl=en.
