No need for explicit return values in blocks `-> (a, b)`

Issue #1 resolved
Pierre Augier created an issue
if fp.is_pythranized:
    a, b = fp.use_pythranized_block("myblock")
else:
    # pythran block () -> (a, b)
    a = b = c = 1

-> (a, b) is redundant and we should be able to avoid it and to infer the returned variables of the block from the values returned by fp.use_pythranized_block.

Comments (4)

  1. Pierre Augier reporter

    We don't need to work on this if we prefer the alternative syntax for block described in issue #9, which would give for the following code:

    # pythran block () -> (a, b)
    a = b = c = 1
    # pythran end block
    
  2. Pierre Augier reporter

    With the new alternative syntax described in #29, we don't want to explicitly write the "returned" types so we need to detect the modified and created variables!

  3. Log in to comment