change parameters and add pyproperty
@@ -701,12 +701,13 @@ mod _io {
// TextIO Base has no public constructor
#[pyattr]
#[pyclass(name = "_TextIOBase", base = "_IOBase")]
+ #[derive(Debug, PyPayload)]
struct _TextIOBase;
#[pyimpl(flags(BASETYPE))]
impl _TextIOBase {
- #[pyattr]
- fn encoding(vm: &VirtualMachine) -> PyObjectRef {
+ #[pyproperty]
+ fn encoding(&self, vm: &VirtualMachine) -> PyObjectRef {
vm.ctx.none()
}
}
