Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 858809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:35:31+00:00 2026-05-15T08:35:31+00:00

This question is based off some really odd code I recently found in a

  • 0

This question is based off some really odd code I recently found in a colleagues work. He claims not to know how it works only he copied it from somewhere else. That’s not good enough for me, I want to understand what’s going on here.

If we have something like:

(test1, test2, test3="3", test4="4")

The result will be that test1 == "3", test2 == "4", test3 == nil and test4 == "4".
I understand why this happens, but if we do something like:

(test1, test2, test3="3", test4="4", test5 = "5", test6 = "6")

now the result is test1 == "3", test2 == "4", test3 == "5", test4 == "4", test5 == "5", test6 == "6".

Why isn’t test5 == nil?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T08:35:31+00:00Added an answer on May 15, 2026 at 8:35 am

    It looks like it’s executing like this:

    (test1, test2, test3) = ("3"), (test4 = "4"), (test5 = "5"), (test6 = "6")
    
    # Equivalent:
    test1 = "3"
    test2 = test4 = "4"
    test3 = test5 = "5"
          ; test6 = "6"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So, my second question based off of this application I'm teaching myself Objective C
This question is based on this thread . The code function man() { man
This is a question based on: Trying to get tag-it to work with an
I'm doing some math with really big numbers (I'm using Python, but this question
This question is a spin-off from this one . Some history: when I first
This is kind of based off of this question . I'm currently looking at
I've been trying to solve my question based off of this answer: Populate select
This question is based on my previous question which I got a working answer
This question is based on the thread . I have the shell function function
This question is based on this thread . Is [---] a comment in Git

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.