Skip to content

Commit 1ac66cf

Browse files
committed
change parameters and add pyproperty
1 parent 8a3bd85 commit 1ac66cf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

vm/src/stdlib/io.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -701,12 +701,13 @@ mod _io {
701701
// TextIO Base has no public constructor
702702
#[pyattr]
703703
#[pyclass(name = "_TextIOBase", base = "_IOBase")]
704+
#[derive(Debug, PyPayload)]
704705
struct _TextIOBase;
705706

706707
#[pyimpl(flags(BASETYPE))]
707708
impl _TextIOBase {
708-
#[pyattr]
709-
fn encoding(vm: &VirtualMachine) -> PyObjectRef {
709+
#[pyproperty]
710+
fn encoding(&self, vm: &VirtualMachine) -> PyObjectRef {
710711
vm.ctx.none()
711712
}
712713
}

0 commit comments

Comments
 (0)