Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6f8e06a

Browse files
drew-512Drew O'Meara
and
Drew O'Meara
authored
all: minor comment and typos cleanups
Co-authored-by: Drew O'Meara <drew@plan-systems.org>
1 parent1815995 commit6f8e06a

File tree

10 files changed

+19
-12
lines changed

10 files changed

+19
-12
lines changed

‎py/bigint.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func BigIntCheckExact(obj Object) (*BigInt, error) {
5555
returnbigInt,nil
5656
}
5757

58-
// Checks that obj is exactly abigInd and returns an error if not
58+
// Checks that obj is exactly aBigInt and returns an error if not
5959
funcBigIntCheck(objObject) (*BigInt,error) {
6060
// FIXME should be checking subclasses
6161
returnBigIntCheckExact(obj)
@@ -65,7 +65,7 @@ func BigIntCheck(obj Object) (*BigInt, error) {
6565

6666
// Convert an Object to an BigInt
6767
//
68-
//Retrurns ok as to whether the conversion worked or not
68+
//Returns ok as to whether the conversion worked or not
6969
funcConvertToBigInt(otherObject) (*BigInt,bool) {
7070
switchb:=other.(type) {
7171
caseInt:

‎py/bool.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func (a Bool) M__repr__() (Object, error) {
5252

5353
// Convert an Object to an Bool
5454
//
55-
//Retrurns ok as to whether the conversion worked or not
55+
//Returns ok as to whether the conversion worked or not
5656
funcconvertToBool(otherObject) (Bool,bool) {
5757
switchb:=other.(type) {
5858
caseBool:

‎py/bytes.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ func (a Bytes) M__repr__() (Object, error) {
187187

188188
// Convert an Object to an Bytes
189189
//
190-
//Retrurns ok as to whether the conversion worked or not
190+
//Returns ok as to whether the conversion worked or not
191191
funcconvertToBytes(otherObject) (Bytes,bool) {
192192
switchb:=other.(type) {
193193
caseBytes:

‎py/complex.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func ComplexNew(metatype *Type, args Tuple, kwargs StringDict) (Object, error) {
4242

4343
// Convert an Object to an Complex
4444
//
45-
//Retrurns ok as to whether the conversion worked or not
45+
//Returns ok as to whether the conversion worked or not
4646
funcconvertToComplex(otherObject) (Complex,bool) {
4747
switchb:=other.(type) {
4848
caseComplex:

‎py/float.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ var floatDivisionByZero = ExceptionNewf(ZeroDivisionError, "float division by ze
118118

119119
// Convert an Object to an Float
120120
//
121-
//Retrurns ok as to whether the conversion worked or not
121+
//Returns ok as to whether the conversion worked or not
122122
funcconvertToFloat(otherObject) (Float,bool) {
123123
switchb:=other.(type) {
124124
caseFloat:

‎py/int.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ func cantConvert(a Object, to string) (Object, error) {
216216

217217
// Convert an Object to an Int
218218
//
219-
//Retrurns ok as to whether the conversion worked or not
219+
//Returns ok as to whether the conversion worked or not
220220
funcconvertToInt(otherObject) (Int,bool) {
221221
switchb:=other.(type) {
222222
caseInt:

‎py/none.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func (a NoneType) M__repr__() (Object, error) {
3333

3434
// Convert an Object to an NoneType
3535
//
36-
//Retrurns ok as to whether the conversion worked or not
36+
//Returns ok as to whether the conversion worked or not
3737
funcconvertToNoneType(otherObject) (NoneType,bool) {
3838
switchb:=other.(type) {
3939
caseNoneType:

‎py/run.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,11 @@ func RunSrc(ctx Context, pySrc string, pySrcDesc string, inModule interface{}) (
135135
}
136136

137137
// RunCode executes the given code object within the given module and returns the Module to indicate success.
138+
//
138139
// If inModule is a *Module, then the code is run in that module.
140+
//
139141
// If inModule is nil, the code is run in a new __main__ module (and the new Module is returned).
142+
//
140143
// If inModule is a string, the code is run in a new module with the given name (and the new Module is returned).
141144
funcRunCode(ctxContext,code*Code,codeDescstring,inModuleinterface{}) (*Module,error) {
142145
var (

‎py/string.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ func (a String) M__imul__(other Object) (Object, error) {
300300

301301
// Convert an Object to an String
302302
//
303-
//Retrurns ok as to whether the conversion worked or not
303+
//Returns ok as to whether the conversion worked or not
304304
funcconvertToString(otherObject) (String,bool) {
305305
switchb:=other.(type) {
306306
caseString:

‎stdlib/stdlib.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ type context struct {
4747

4848
// NewContext creates a new gpython interpreter instance context.
4949
//
50-
// SeetypeContextinterface for info.
50+
// Seeinterface py.Contextdefined in py/run.go
5151
funcNewContext(opts py.ContextOpts) py.Context {
5252
ctx:=&context{
5353
opts:opts,
@@ -109,6 +109,7 @@ func (ctx *context) ModuleInit(impl *py.ModuleImpl) (*py.Module, error) {
109109
returnmodule,nil
110110
}
111111

112+
// See interface py.Context defined in py/run.go
112113
func (ctx*context)ResolveAndCompile(pathnamestring,opts py.CompileOpts) (py.CompileOut,error) {
113114
err:=ctx.pushBusy()
114115
deferctx.popBusy()
@@ -202,7 +203,7 @@ func (ctx *context) popBusy() {
202203
ctx.running.Done()
203204
}
204205

205-
//Close -- see type py.Context
206+
//See interface py.Context defined in py/run.go
206207
func (ctx*context)Close()error {
207208
ctx.closeOnce.Do(func() {
208209
ctx.closing=true
@@ -216,7 +217,7 @@ func (ctx *context) Close() error {
216217
returnnil
217218
}
218219

219-
//Done -- see type py.Context
220+
//See interface py.Context defined in py/run.go
220221
func (ctx*context)Done()<-chanstruct{} {
221222
returnctx.done
222223
}
@@ -274,6 +275,7 @@ func resolveRunPath(runPath string, opts py.CompileOpts, pathObjs []py.Object, t
274275
returnerr
275276
}
276277

278+
// See interface py.Context defined in py/run.go
277279
func (ctx*context)RunCode(code*py.Code,globals,locals py.StringDict,closure py.Tuple) (py.Object,error) {
278280
err:=ctx.pushBusy()
279281
deferctx.popBusy()
@@ -284,10 +286,12 @@ func (ctx *context) RunCode(code *py.Code, globals, locals py.StringDict, closur
284286
returnvm.EvalCode(ctx,code,globals,locals,nil,nil,nil,nil,closure)
285287
}
286288

289+
// See interface py.Context defined in py/run.go
287290
func (ctx*context)GetModule(moduleNamestring) (*py.Module,error) {
288291
returnctx.store.GetModule(moduleName)
289292
}
290293

294+
// See interface py.Context defined in py/run.go
291295
func (ctx*context)Store()*py.ModuleStore {
292296
returnctx.store
293297
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp