[Bug 2130498] [NEW] range(3, 4) in range(1, 6) is valid but always returns False

Simon Lambourn 2130498 at bugs.launchpad.net
Sat Nov 1 16:57:40 UTC 2025


Public bug reported:

This came up as I was looking for overlapping ranges.

The expression  range(3,4) in range(1,6)   is accepted as valid Python
but always returns false.

Expected behaviour:   either return True (in this example) or raise
TypeError.

ProblemType: Bug
DistroRelease: Ubuntu 25.04
Package: python3 3.13.3-1
ProcVersionSignature: Ubuntu 6.14.0-35.35-generic 6.14.11
Uname: Linux 6.14.0-35-generic x86_64
ApportVersion: 2.32.0-0ubuntu5.3
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Sat Nov  1 16:54:02 2025
SourcePackage: python3-defaults
UpgradeStatus: Upgraded to plucky on 2025-06-11 (143 days ago)

** Affects: python3-defaults (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug plucky wayland-session

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python3-defaults in Ubuntu.
https://bugs.launchpad.net/bugs/2130498

Title:
  range(3,4) in range(1,6) is valid but always returns False

Status in python3-defaults package in Ubuntu:
  New

Bug description:
  This came up as I was looking for overlapping ranges.

  The expression  range(3,4) in range(1,6)   is accepted as valid Python
  but always returns false.

  Expected behaviour:   either return True (in this example) or raise
  TypeError.

  ProblemType: Bug
  DistroRelease: Ubuntu 25.04
  Package: python3 3.13.3-1
  ProcVersionSignature: Ubuntu 6.14.0-35.35-generic 6.14.11
  Uname: Linux 6.14.0-35-generic x86_64
  ApportVersion: 2.32.0-0ubuntu5.3
  Architecture: amd64
  CasperMD5CheckResult: unknown
  CurrentDesktop: ubuntu:GNOME
  Date: Sat Nov  1 16:54:02 2025
  SourcePackage: python3-defaults
  UpgradeStatus: Upgraded to plucky on 2025-06-11 (143 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python3-defaults/+bug/2130498/+subscriptions




More information about the foundations-bugs mailing list