@@ -1666,7 +1666,7 @@ impl Compiler<'_> {
1666
1666
let key = self . symbol_table_stack . len ( ) - 1 ;
1667
1667
let lineno = expr. range ( ) . start ( ) . to_u32 ( ) ;
1668
1668
1669
- // Enter scope with the type parameter name (matching CPython)
1669
+ // Enter scope with the type parameter name
1670
1670
self . enter_scope ( name, CompilerScope :: TypeParams , key, lineno) ?;
1671
1671
1672
1672
// Compile the expression
@@ -1712,7 +1712,7 @@ impl Compiler<'_> {
1712
1712
} ) ;
1713
1713
1714
1714
if let Some ( expr) = & bound {
1715
- // Use compile_type_param_bound_or_default for bound (matching CPython)
1715
+ // Use compile_type_param_bound_or_default for bound
1716
1716
let scope_name = if expr. is_tuple_expr ( ) {
1717
1717
format ! ( "<TypeVar constraint of {}>" , name. as_str( ) )
1718
1718
} else {
@@ -1737,7 +1737,7 @@ impl Compiler<'_> {
1737
1737
1738
1738
// Handle default value if present (PEP 695)
1739
1739
if let Some ( default_expr) = default {
1740
- // Use compile_type_param_bound_or_default for default (matching CPython)
1740
+ // Use compile_type_param_bound_or_default for default
1741
1741
let scope_name = format ! ( "<TypeVar default of {}>" , name. as_str( ) ) ;
1742
1742
self . compile_type_param_bound_or_default ( default_expr, & scope_name, false ) ?;
1743
1743
emit ! (
@@ -1764,7 +1764,7 @@ impl Compiler<'_> {
1764
1764
1765
1765
// Handle default value if present (PEP 695)
1766
1766
if let Some ( default_expr) = default {
1767
- // Use compile_type_param_bound_or_default for default (matching CPython)
1767
+ // Use compile_type_param_bound_or_default for default
1768
1768
let scope_name = format ! ( "<ParamSpec default of {}>" , name. as_str( ) ) ;
1769
1769
self . compile_type_param_bound_or_default ( default_expr, & scope_name, false ) ?;
1770
1770
emit ! (
@@ -1791,7 +1791,7 @@ impl Compiler<'_> {
1791
1791
1792
1792
// Handle default value if present (PEP 695)
1793
1793
if let Some ( default_expr) = default {
1794
- // Use compile_type_param_bound_or_default for default (matching CPython)
1794
+ // Use compile_type_param_bound_or_default for default
1795
1795
// TypeVarTuple allows starred expressions
1796
1796
let scope_name = format ! ( "<TypeVarTuple default of {}>" , name. as_str( ) ) ;
1797
1797
self . compile_type_param_bound_or_default ( default_expr, & scope_name, true ) ?;
0 commit comments