(vm: &VirtualMachine, name: &ast::name::Name)
| 14 | } |
| 15 | |
| 16 | fn validate_name(vm: &VirtualMachine, name: &ast::name::Name) -> PyResult<()> { |
| 17 | match name.as_str() { |
| 18 | "None" | "True" | "False" => Err(vm.new_value_error(format!( |
| 19 | "identifier field can't represent '{}' constant", |
| 20 | name.as_str() |
| 21 | ))), |
| 22 | _ => Ok(()), |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | fn validate_comprehension(vm: &VirtualMachine, gens: &[ast::Comprehension]) -> PyResult<()> { |
| 27 | if gens.is_empty() { |
no test coverage detected