Skip to content

Commit edfec36

Browse files
committed
Start of Object operations
1 parent 6cbdfef commit edfec36

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

py/object.go

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Functions to operate on any object
2+
3+
package py
4+
5+
import (
6+
"fmt"
7+
)
8+
9+
// Gets the attribute attr from object or returns nil
10+
func ObjectGetAttr(o Object, attr string) Object {
11+
// FIXME
12+
return nil
13+
}
14+
15+
// Gets the repr for an object
16+
func ObjectRepr(o Object) Object {
17+
// FIXME
18+
return String(fmt.Sprintf("<%s %v>", o.Type().Name, o))
19+
}

0 commit comments

Comments
 (0)