Skip to content

Commit 8cc57c1

Browse files
committed
Correct calling of __init__ for new objects
1 parent 13f5466 commit 8cc57c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

py/type.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1521,7 +1521,7 @@ func ObjectInit(self Object, args Tuple, kwargs StringDict) {
15211521
// Call the __init__ method if it exists
15221522
// FIXME this isn't the way cpython does it - it adjusts the function pointers
15231523
// Only do this for non built in types
1524-
if t, ok := self.(*Type); ok {
1524+
if _, ok := self.(*Type); ok {
15251525
init := t.GetAttrOrNil("__init__")
15261526
fmt.Printf("init = %v\n", init)
15271527
if init != nil {

0 commit comments

Comments
 (0)