@@ -296,6 +296,11 @@ class CommonSubtypeOfTuples(I1, I2): ...
296296
297297## Truthiness
298298
299+ ``` toml
300+ [environment ]
301+ python-version = " 3.11"
302+ ```
303+
299304The truthiness of the empty tuple is ` False ` .
300305
301306``` py
@@ -341,6 +346,21 @@ static_assert(not is_assignable_to(tuple[Literal[False], ...], AlwaysFalsy))
341346static_assert(not is_assignable_to(tuple[Literal[False ], ... ], AlwaysTruthy))
342347static_assert(not is_assignable_to(tuple[Literal[True ], ... ], AlwaysFalsy))
343348static_assert(not is_assignable_to(tuple[Literal[True ], ... ], AlwaysTruthy))
349+
350+ static_assert(is_assignable_to(tuple[int , * tuple[Any, ... ]], AlwaysTruthy))
351+ static_assert(is_assignable_to(tuple[int , * tuple[bool , ... ]], AlwaysTruthy))
352+ static_assert(is_assignable_to(tuple[int , * tuple[Literal[False ], ... ]], AlwaysTruthy))
353+ static_assert(is_assignable_to(tuple[int , * tuple[Literal[True ], ... ]], AlwaysTruthy))
354+
355+ static_assert(is_assignable_to(tuple[* tuple[Any, ... ], int ], AlwaysTruthy))
356+ static_assert(is_assignable_to(tuple[* tuple[bool , ... ], int ], AlwaysTruthy))
357+ static_assert(is_assignable_to(tuple[* tuple[Literal[False ], ... ], int ], AlwaysTruthy))
358+ static_assert(is_assignable_to(tuple[* tuple[Literal[True ], ... ], int ], AlwaysTruthy))
359+
360+ static_assert(is_assignable_to(tuple[int , * tuple[Any, ... ], int ], AlwaysTruthy))
361+ static_assert(is_assignable_to(tuple[int , * tuple[bool , ... ], int ], AlwaysTruthy))
362+ static_assert(is_assignable_to(tuple[int , * tuple[Literal[False ], ... ], int ], AlwaysTruthy))
363+ static_assert(is_assignable_to(tuple[int , * tuple[Literal[True ], ... ], int ], AlwaysTruthy))
344364```
345365
346366Both of these results are conflicting with the fact that tuples can be subclassed, and that we
0 commit comments