laike9m / laike9m/Python-Type-Challenges

[Bug] in Intermediate empty-tuple exercise

Open
#121 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
628
Forks
36
PR merge metrics
No merged PRs in 30d

Description

Hi, I believe there is a bug in the in Intermediate empty-tuple exercise.

Relevant code:

foo((1))  # expect-type-error

(1) is not a tuple, but rather an integer, I believe a comma is missing. In effect, typing the function argument as tuple only will (incorrectly) pass the challenge.

Solution is to add a comma to make the argument a tuple:

foo((1,))  # expect-type-error

Thanks for providing fun and educative typing challenges.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open the Intermediate empty-tuple exercise at the linked URL and inspect the example containing foo((1)). Verify the exercise input is interpreted as a tuple and that its type-checking behavior matches the stated expectation; the issue is done when the example no longer passes incorrectly.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
content
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.