Skip to content
Snippets Groups Projects

WIP : FOR loops issue #157 + str(wide) #169

Closed matograine requested to merge (removed):dev-mato-for-loops into dev
1 unresolved thread

Using "for" loops instead of "while".

Testing this code : I get errors when using the "net" command on the default g1 server. Not on duniter.moul.re.

socket.timeout: The read operation timed out

Edited by matograine

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
168 168 except:
169 169 return NO_MATCHING_ID
170 170 i, results = 0, results["results"]
171 while i < len(results):
171 for i in range( len(results) ):
172 172 if results[i]["uids"][0]["uid"] != pubkey:
173 173 return results[i]["uids"][0]["uid"]
  • A better solution would be to use:

    for result in results:
       if result["uids"][0]["uid"] !=pubkey:

    Same for upper modification.

    Edited by Moul
  • Do you plan to make this changes in the comments (also for the other MR) soon enough?

    I don’t mean to solve the conflict. I can take care of it if you don’t manage to do it.

  • Please register or sign in to reply
  • Moul changed milestone to %0.7.0

    changed milestone to %0.7.0

  • Moul assigned to @moul

    assigned to @moul

  • Done in 01e1085e, bcc46437, and 27798a06. Thanks.

  • closed

  • added enhancement label

  • Please register or sign in to reply
    Loading