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
This repository was archived by the owner on Feb 1, 2023. It is now read-only.

Commit6084109

Browse files
author
Release Manager
committed
Trac #34841: adapt findstat doctests to new newlines
https://findstat.org now normalizes all newlines from `\n` to `\r\n`.This ticket adapts the doctests accordingly.URL:https://trac.sagemath.org/34841Reported by: mantepseTicket author(s): Martin RubeyReviewer(s): Travis Scrimshaw
2 parentse09c847 +631d1d3 commit6084109

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

‎src/sage/databases/findstat.py‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1799,7 +1799,7 @@ def set_sage_code(self, value):
17991799
EXAMPLES::
18001800
18011801
sage: q = findstat([(d, randint(1,1000)) for d in DyckWords(4)]) # optional -- internet
1802-
sage: q.set_sage_code("def statistic(x):\r\n return randint(1,1000)") # optional -- internet
1802+
sage: q.set_sage_code("def statistic(x):\n return randint(1,1000)") # optional -- internet
18031803
sage: print(q.sage_code()) # optional -- internet
18041804
def statistic(x):
18051805
return randint(1,1000)
@@ -1918,8 +1918,8 @@ def first_terms_str(self, max_values=FINDSTAT_MAX_SUBMISSION_VALUES):
19181918
sage: len(st.cache) # optional -- internet
19191919
100
19201920
"""
1921-
return"\r\n".join(key+" => "+str(val)
1922-
forkey,valinself._first_terms_raw(max_values=max_values))
1921+
return"\n".join(key+" => "+str(val)
1922+
forkey,valinself._first_terms_raw(max_values=max_values))
19231923

19241924
def_fetch_first_terms(self):
19251925
r"""
@@ -2213,10 +2213,10 @@ def _fetch_data(self):
22132213
'MathSciNet:1418763': {'Author': 'Simion, R., Stanton, D.',
22142214
'Title': 'Octabasic Laguerre polynomials and permutation statistics'}},
22152215
'Code': 'def statistic(x):\r\n return len(x.nestings())',
2216-
'Description': 'The number of nestings of a perfect matching. \r\n\r\n\r\nThis is the number of pairs of edges $((a,b), (c,d))$ such that $a\\le c\\le d\\le b$. i.e., the edge $(c,d)$ is nested inside $(a,b)$.',
2216+
'Description': 'The number of nestings of a perfect matching.\r\n\r\nThis is the number of pairs of edges $((a,b), (c,d))$ such that $a\\le c\\le d\\le b$. i.e., the edge $(c,d)$ is nested inside $(a,b)$.',
22172217
'Domain': 'Cc0012',
22182218
'Name': 'The number of nestings of a perfect matching.',
2219-
'References': '[1] [[MathSciNet:1288802]]\n[2] [[MathSciNet:1418763]]',
2219+
'References': '[1] [[MathSciNet:1288802]]\r\n[2] [[MathSciNet:1418763]]',
22202220
'SageCode': 'def statistic(x):\r\n return len(x.nestings())'}
22212221
"""
22222222
fields="Bibliography,Code,Description,Domain,Name,References,SageCode"
@@ -2337,7 +2337,7 @@ def statistic(x):
23372337
EXAMPLES::
23382338
23392339
sage: q = findstat([(d, randint(1,1000)) for d in DyckWords(4)]) # optional -- internet
2340-
sage: q.set_code("def statistic(x):\r\n return randint(1,1000)") # optional -- internet
2340+
sage: q.set_code("def statistic(x):\n return randint(1,1000)") # optional -- internet
23412341
sage: print(q.code()) # optional -- internet
23422342
def statistic(x):
23432343
return randint(1,1000)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp