Skip to content

Commit 8a3bd85

Browse files
committed
implement TextIOBase encoding attribute
1 parent d3e8e47 commit 8a3bd85

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

vm/src/stdlib/io.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,12 @@ mod _io {
704704
struct _TextIOBase;
705705

706706
#[pyimpl(flags(BASETYPE))]
707-
impl _TextIOBase {}
707+
impl _TextIOBase {
708+
#[pyattr]
709+
fn encoding(vm: &VirtualMachine) -> PyObjectRef {
710+
vm.ctx.none()
711+
}
712+
}
708713

709714
#[derive(FromArgs, Clone)]
710715
struct BufferSize {

0 commit comments

Comments
 (0)