Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][tlug] variable assignments inside expressions in python
- Date: Tue, 10 Jul 2007 16:01:11 +0900
- From: "Hector Akamine" <akamine@example.com>
- Subject: [tlug] variable assignments inside expressions in python
Hi,
In C, I can do a variable assignment inside a while expression, like:
while ( (myvar = get_time( ) ) < DEADLINE) { /* use the value of myvar somewhere*/ ... }
Trying to do the same in python while ( (myvar = get_time( ) ) < DEADLINE):
throws an error. Is there a "python way" to do this? (I have googled a little and the answer seems that I can't, but I refuse to accept it :-) )
Thanks, Hector
- Follow-Ups:
- [tlug] variable assignments inside expressions in python
- From: Stephen J. Turnbull
- Re: [tlug] variable assignments inside expressions in python
- From: tlug
- Re: [tlug] variable assignments inside expressions in python
- From: david.blomberg@example.com
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Linux Distro Choices [was Re: Denshi Jisho]
- Next by Date: Re: [tlug] Re: [OFF-LIST] Re: Where might I send my article?
- Previous by thread: [tlug] [JOB] Senior Partner Liaison Engineer
- Next by thread: [tlug] variable assignments inside expressions in python
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links