mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-09 22:49:57 +09:00
Only emit defaults tuple if we have some
This commit is contained in:
@@ -367,9 +367,11 @@ impl Compiler {
|
||||
}
|
||||
|
||||
let have_kwargs = default_elements.len() > 0;
|
||||
self.compile_expression(&ast::Expression::Tuple {
|
||||
elements: default_elements,
|
||||
});
|
||||
if have_kwargs {
|
||||
self.compile_expression(&ast::Expression::Tuple {
|
||||
elements: default_elements,
|
||||
});
|
||||
}
|
||||
|
||||
self.code_object_stack.push(CodeObject::new(names, None));
|
||||
self.compile_statements(body);
|
||||
|
||||
Reference in New Issue
Block a user