@@ -76,7 +76,7 @@ func (it *Generator) M__next__() Object {
76
76
// without yielding another value. When send() is called to start the
77
77
// generator, it must be called with None as the argument, because
78
78
// there is no yield expression that could receive the value.
79
- func (it * Generator ) Send (value Object ) {
79
+ func (it * Generator ) Send (value Object ) Object {
80
80
panic ("generator send not implemented" )
81
81
}
82
82
@@ -88,7 +88,7 @@ func (it *Generator) Send(value Object) {
88
88
// StopIteration exception is raised. If the generator function does
89
89
// not catch the passed-in exception, or raises a different exception,
90
90
// then that exception propagates to the caller.
91
- func (it * Generator ) Throw (args Tuple , kwargs StringDict ) {
91
+ func (it * Generator ) Throw (args Tuple , kwargs StringDict ) Object {
92
92
panic ("generator throw not implemented" )
93
93
}
94
94
@@ -102,9 +102,9 @@ func (it *Generator) Throw(args Tuple, kwargs StringDict) {
102
102
// generator raises any other exception, it is propagated to the
103
103
// caller. close() does nothing if the generator has already exited
104
104
// due to an exception or normal exit.
105
- func (it * Generator ) Close () {
105
+ func (it * Generator ) Close () Object {
106
106
panic ("generator close not implemented" )
107
107
}
108
108
109
109
// Check interface is satisfied
110
- var _ I_iterator = (* Generator )(nil )
110
+ var _ I_generator = (* Generator )(nil )
0 commit comments