Re: while expression feature proposal

Discussion in 'Python' started by Chris Angelico, Oct 24, 2012.

  1. On Thu, Oct 25, 2012 at 9:26 AM, Cameron Simpson <> wrote:
    > If I could write this as:
    >
    > if re_FUNKYPATTERN.match(test_string) as m:
    > do stuff with the results of the match, using "m"


    Then you'd be right there with C-like languages where assignment is an
    expression :)

    while (tok = strtok(blah,blah)) ... do something with tok ...

    ChrisA
    Chris Angelico, Oct 24, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dan Loewenherz

    while expression feature proposal

    Dan Loewenherz, Oct 24, 2012, in forum: Python
    Replies:
    1
    Views:
    145
    Paul Rubin
    Oct 24, 2012
  2. Ian Kelly
    Replies:
    0
    Views:
    131
    Ian Kelly
    Oct 24, 2012
  3. Tim Chase
    Replies:
    0
    Views:
    148
    Tim Chase
    Oct 24, 2012
  4. Cameron Simpson

    Re: while expression feature proposal

    Cameron Simpson, Oct 24, 2012, in forum: Python
    Replies:
    6
    Views:
    161
    Thomas Rachel
    Oct 25, 2012
  5. Tim Chase
    Replies:
    0
    Views:
    217
    Tim Chase
    Oct 24, 2012
Loading...

Share This Page