Update vm/src/stdlib/builtins.rs

Co-authored-by: Jeong YunWon <69878+youknowone@users.noreply.github.com>
This commit is contained in:
Jim Fasarakis-Hilliard
2021-10-16 21:10:57 +03:00
committed by GitHub
parent 2f3f3f8505
commit 61c325371b

View File

@@ -872,8 +872,6 @@ mod builtins {
let bases: PyObjectRef = bases.into();
// Prepare uses full __getattribute__ resolution chain.
// If an AttributeError was raised (None), return an empty dict,
// else invoke prepare callable.
let namespace = vm
.get_attribute_opt(metaclass.clone(), "__prepare__")?
.map_or(Ok(vm.ctx.new_dict().into()), |prepare| {