Skip to content

Commit bd57c4d

Browse files
committed
a few more fixes
1 parent 273296d commit bd57c4d

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

src/sage/interfaces/gap3.py

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@
178178
179179
sage: # optional - gap3
180180
sage: gap3.load_package("chevie")
181-
sage: gap3.version() # random
181+
sage: gap3.version() # random # not tested
182182
'lib: v3r4p4 1997/04/18, src: v3r4p0 1994/07/10, sys: usg gcc ansi'
183183
184184
Working with GAP3 lists. Note that GAP3 lists are 1-indexed::
@@ -302,11 +302,12 @@ def __init__(self, command=gap3_cmd):
302302
303303
EXAMPLES::
304304
305-
sage: gap3 = Gap3() #optional - gap3
305+
sage: # optional - gap3
306+
sage: gap3 = Gap3()
306307
sage: gap3.is_running()
307308
False
308-
sage: gap3._start() #optional - gap3
309-
sage: gap3.is_running() #optional - gap3
309+
sage: gap3._start()
310+
sage: gap3.is_running()
310311
True
311312
"""
312313
self.__gap3_command_string = command
@@ -341,18 +342,20 @@ def _start(self):
341342
342343
EXAMPLES::
343344
344-
sage: gap3 = Gap3() #optional - gap3
345+
sage: # optional - gap3
346+
sage: gap3 = Gap3()
345347
sage: gap3.is_running()
346348
False
347-
sage: gap3._start() #optional - gap3
348-
sage: gap3.is_running() #optional - gap3
349+
sage: gap3._start()
350+
sage: gap3.is_running()
349351
True
350352
351353
Check that :trac:`23142` is fixed::
352354
353-
sage: gap3.eval("1+1") #optional - gap3
355+
sage: # optional - gap3
356+
sage: gap3.eval("1+1")
354357
'2'
355-
sage: gap3.quit() #optional - gap3
358+
sage: gap3.quit()
356359
"""
357360
Expect._start(self)
358361
# The -p command-line option to GAP3 produces the following
@@ -504,7 +507,7 @@ def help(self, topic, pager=True):
504507
E.expect_list(self._compiled_small_pattern)
505508

506509
# merge the help text into one string and print it.
507-
helptext = "".join(helptext).strip()
510+
helptext = "".join(bytes_to_str(line) for line in helptext).strip()
508511
if pager is True:
509512
from sage.misc.pager import pager as pag
510513
pag()(helptext)
@@ -513,8 +516,9 @@ def help(self, topic, pager=True):
513516

514517
def cputime(self, t=None):
515518
r"""
516-
Returns the amount of CPU time that the GAP session has used in
517-
seconds. If ``t`` is not None, then it returns the difference
519+
Return the amount of CPU time that the GAP session has used in seconds.
520+
521+
If ``t`` is not None, then it returns the difference
518522
between the current CPU time and ``t``.
519523
520524
EXAMPLES::

0 commit comments

Comments
 (0)