We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 8f56c06 + 0e00ab6 commit db6fd16Copy full SHA for db6fd16
vm/src/builtins/float.rs
@@ -204,8 +204,8 @@ impl PyFloat {
204
}
205
206
207
- #[pymethod(magic)]
208
- fn getformat(&self, spec: PyStrRef, vm: &VirtualMachine) -> PyResult<String> {
+ #[pystaticmethod(magic)]
+ fn getformat(spec: PyStrRef, vm: &VirtualMachine) -> PyResult<String> {
209
if !matches!(spec.as_str(), "double" | "float") {
210
return Err(vm.new_value_error(
211
"__getformat__() argument 1 must be 'double' or 'float'".to_owned(),
0 commit comments