Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit ae30cf3

Browse files
committed
Basic conversion to sage doctrings/doctesting. Remove original copyright/license functions.
1 parent d0bc786 commit ae30cf3

File tree

1 file changed

+28
-49
lines changed

1 file changed

+28
-49
lines changed

src/sage/rings/polynomial/pbori/frontend.py

Lines changed: 28 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,30 @@
33
This module defines an initial ring, and patches the declare_ring to use
44
a given context.
55
6-
7-
sage: x(0)
8-
x(0)
9-
sage: x(0)*x(0)
10-
x(0)
11-
sage: x(0) + x(0)
12-
0
13-
sage: x(9999)
14-
x(9999)
15-
sage: x(9999)*x(9999)
16-
x(9999)
17-
sage: x(9999) + x(9999)
18-
0
19-
20-
sage: from sage.rings.polynomial.pbori.brial.frontend import *
21-
sage: context = dict(globals())
22-
sage: polybori_start(context) # doctest: +ELLIPSIS
23-
ipbori...
24-
sage: r = context['declare_ring']('abc')
25-
sage: context['a']
26-
a
27-
sage: r.variable(0)
28-
a
6+
EXAMPLES::
7+
8+
sage: x(0)
9+
x(0)
10+
sage: x(0)*x(0)
11+
x(0)
12+
sage: x(0) + x(0)
13+
0
14+
sage: x(9999)
15+
x(9999)
16+
sage: x(9999)*x(9999)
17+
x(9999)
18+
sage: x(9999) + x(9999)
19+
0
20+
21+
sage: from sage.rings.polynomial.pbori.brial.frontend import *
22+
sage: context = dict(globals())
23+
sage: polybori_start(context)
24+
ipbori...
25+
sage: r = context['declare_ring']('abc')
26+
sage: context['a']
27+
a
28+
sage: r.variable(0)
29+
a
2930
"""
3031

3132
from __future__ import print_function
@@ -36,7 +37,9 @@
3637

3738

3839
def block_scheme_names(blocks):
39-
"""Helper for Singular interface."""
40+
r"""
41+
Helper for Singular interface.
42+
"""
4043

4144
context = dict()
4245
from .blocks import declare_block_scheme
@@ -47,29 +50,6 @@ def block_scheme_names(blocks):
4750
ipbname = 'ipbori'
4851

4952

50-
def polybori_copyright():
51-
print("""Copyright (c) 2007-2011 by The PolyBoRi Team.
52-
Michael Brickenstein (MFO) [email protected]
53-
Alexander Dreyer (ITWM) [email protected]
54-
55-
The PolyBoRi Team is a joint project of
56-
Mathematisches Forschungsinstitut Oberwolfach (MFO), Germany
57-
Department of Mathematics, University of Kaiserslautern, Germany, and
58-
Fraunhofer Institute for Industrial Mathematics (ITWM), Kaiserslautern, Germany.
59-
60-
PolyBoRi incorporates the following works:
61-
The CU Decision Diagrams Package Release 2.4.1 (CUDD) by Fabio Somenzi,
62-
Copyright (c) 1995-2004, Regents of the University of Colorado. All Rights Reserved.
63-
The M4RI Library - http://m4ri.sagemath.org
64-
Copyright (C) 2007-2010, Martin Albrecht, Gregory Bard, and The M4RI Team""")
65-
66-
67-
def polybori_license():
68-
print("""ipbori and the PolyBoRi framework are licensed under the terms of
69-
the GNU General Public License (GPL) version 2 or later.
70-
See http://www.gnu.org/licenses/ for details.""")
71-
72-
7353
def polybori_start(global_context):
7454
def declare_ring(blocks, context=None):
7555
if context is None:
@@ -79,8 +59,7 @@ def declare_ring(blocks, context=None):
7959
declare_ring.__doc__ = orig_declare_ring.__doc__
8060
global_context["declare_ring"] = declare_ring
8161

82-
print(ipbname + """ -- The interactive command line tool of PolyBoRi %s
83-
Type "polybori_copyright()" or "polybori_license()" for more information.
62+
print(ipbname + """ -- The interactive command line tool of PolyBoRi/BRiAL %s
8463
""" % global_context.get("polybori_version", ''))
8564

8665
# Here come the defaults

0 commit comments

Comments
 (0)