Skip to content

Commit 5f03d50

Browse files
committed
Basic file object
1 parent 9a1bb3e commit 5f03d50

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

py/file.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// File object
2+
//
3+
// FIXME cpython 3.3 has a compicated heirachy of types to implement
4+
// this which we do not emulate yet
5+
6+
package py
7+
8+
import (
9+
"os"
10+
)
11+
12+
var FileType = NewTypeX("file", `represents an open file`,
13+
nil, nil)
14+
15+
type File os.File
16+
17+
// Type of this object
18+
func (o *File) Type() *Type {
19+
return FileType
20+
}
21+
22+
// Check interface is satisfied

0 commit comments

Comments
 (0)