To be 100% sure how App Engine will behave, I suggest the free App Engine Console tool (which I maintain). It's a web-based Python Console you can run on the SDK or the production servers.
http://con.appspot.com/ On Sep 13, 8:32 am, 风笑雪 <[email protected]> wrote: > Hi, I tested it in Python 2.5.4, that's correct: > > >>> [] and 5 > [] > >>> [] or 5 > > 5 > > 2009/9/13 Nick Johnson (Google) <[email protected]>: > > > > > On Sat, Sep 12, 2009 at 5:27 PM, 老桃 <[email protected]> wrote: > > >> why does this behaviour deffrent from python shell then? > > > It's not - the behaviour you describe is what I get in a regular Python > > shell - and it's the correct behaviour, as far as Python goes. > > > -Nick > > >> On Sep 12, 11:03 pm, "Nick Johnson (Google)" <[email protected]> > >> wrote: > >> > On Sat, Sep 12, 2009 at 5:46 AM, 老桃 <[email protected]> wrote: > > >> > > ok. codes are: > > >> > > from google.appengine.ext import webapp > > >> > > class UserMng( webapp.RequestHandler ): > >> > > def get( self ): > > >> > > a = [] > >> > > b = ( a ) and 5 > > >> > > print b > > >> > > outputs: > > >> > > [] > > >> > I get this behaviour on the Python console, too. It's the correct > >> > behaviour > >> > - the Python 'and' operator returns the first non-true argument. > > >> > -Nick > > >> > > Status: 200 OK > >> > > Content-Type: text/html; charset=utf-8 > >> > > Cache-Control: no-cache > >> > > Expires: Fri, 01 Jan 1990 00:00:00 GMT > >> > > Content-Length: 0 > > >> > > dev server version is 1.2.5 > > >> > > On Sep 12, 12:17 am, "Nick Johnson (Google)" <[email protected]> > >> > > wrote: > >> > > > Hi saintthor, > >> > > > Can you please provide a complete example that reproduces this on > >> > > > the dev > >> > > > server? > > >> > > > -Nick Johnson > > >> > -- > >> > Nick Johnson, Developer Programs Engineer, App Engine > > > -- > > Nick Johnson, Developer Programs Engineer, App Engine --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" 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/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---
