Combining colon statements on one line?
Steven Bethard
steven.bethard at gmail.com
Fri Jul 16 13:03:15 EDT 2004
More information about the Python-list mailing list
Fri Jul 16 13:03:15 EDT 2004
- Previous message (by thread): Combining colon statements on one line?
- Next message (by thread): Question For Language Lawyers - WAS: Re: Combining colon statements on one line?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Dave Blackington <metapsyc at yahoo.com> wrote in message news:<mailman.473.1089954583.5135.python-list at python.org>... > '972' '006' > > I have two dates without the millenium included. > Using basic 'if' 'else' communication, this, it seems > to me would require 4 lines of python to add the > correct millenium. How about: abbrYear < PIVOT_YEAR and 2000 or 1000 and's and or's will usually do the trick unless one of the result values evaluates to false, e.g. abbrYear < PIVOT_YEAR and 0 or 1000 would be bad because it would alway give you 1000. But in your case, I think yo're okay. Steve
- Previous message (by thread): Combining colon statements on one line?
- Next message (by thread): Question For Language Lawyers - WAS: Re: Combining colon statements on one line?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list