#3019 closed defect (fixed)

Remove tuple unpacking in function definitions for Python3 compatibility

Reported by: heartsucker Owned by: GitHub <noreply@…>
Priority: normal Milestone: Support Python 3
Component: unknown Version: 1.12.1
Keywords: Cc:
Launchpad Bug:

Description

*** Error []compiling './src/allmydata/immutable/encode.py'...
  File "./src/allmydata/immutable/encode.py", line 423
    def _send_segment(self, (shares, shareids), segnum):
                            ^
SyntaxError: invalid syntax

Change History (3)

comment:1 Changed at 2019-03-29T17:13:20Z by heartsucker

A quick estimation shows 296 function definitions that use this notation, many in the test suites. We should be rewritten as much as possible so the tuples are unpaced at the callsite and not inside the function. However, it looks like some instances of this are the result of using callbacks and partial function application (?), so this may not be possible.

comment:3 Changed at 2019-04-26T17:37:59Z by GitHub <noreply@…>

  • Owner set to GitHub <noreply@…>
  • Resolution set to fixed
  • Status changed from new to closed

In 27a0a740/trunk:

Merge pull request #600 from tahoe-lafs/3019-remove-tuple-unpacking

3019 remove tuple unpacking, Fixes: ticket:3019

Note: See TracTickets for help on using tickets.