From cb7874f49d3d55df73a3c529773af14e2e344fb7 Mon Sep 17 00:00:00 2001 From: andrei kulakov Date: Sat, 19 Mar 2022 08:27:37 -0400 Subject: bpo-44544: add textwrap placeholder arg (GH-27671) --- Doc/library/textwrap.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Doc/library/textwrap.rst b/Doc/library/textwrap.rst index 7780e24..1a9d5f9 100644 --- a/Doc/library/textwrap.rst +++ b/Doc/library/textwrap.rst @@ -21,7 +21,8 @@ functions should be good enough; otherwise, you should use an instance of subsequent_indent="", expand_tabs=True, \ replace_whitespace=True, fix_sentence_endings=False, \ break_long_words=True, drop_whitespace=True, \ - break_on_hyphens=True, tabsize=8, max_lines=None) + break_on_hyphens=True, tabsize=8, max_lines=None, \ + placeholder=' [...]') Wraps the single paragraph in *text* (a string) so every line is at most *width* characters long. Returns a list of output lines, without final @@ -39,7 +40,7 @@ functions should be good enough; otherwise, you should use an instance of replace_whitespace=True, fix_sentence_endings=False, \ break_long_words=True, drop_whitespace=True, \ break_on_hyphens=True, tabsize=8, \ - max_lines=None) + max_lines=None, placeholder=' [...]') Wraps the single paragraph in *text*, and returns a single string containing the wrapped paragraph. :func:`fill` is shorthand for :: -- cgit v0.12 e' href='/oss-git/CMake.git/tree/Help/guide/tutorial/Complete/MathFunctions/MathFunctions.cxx?id=cc88ede7a37f8180f670c0d6036ba40cf005c7b9'>treecommitdiffstats
path: root/Help/guide/tutorial/Complete/MathFunctions/MathFunctions.cxx
blob: 01453006297b89b3933988e755bf9bc90537915e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

#include "MathFunctions.h"

#include <cmath>

#ifdef USE_MYMATH
#  include "mysqrt.h"
#endif

namespace mathfunctions {
double sqrt(double x)
{
#ifdef USE_MYMATH
  return detail::mysqrt(x);
#else
  return std::sqrt(x);
#endif
}
}