| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -31,7 +31,7 @@ least slightly uneasy when reading (or being required to write) another style. | |||
| 31 | 31 | Many coding styles place begin/end brackets on a line by themselves. This makes | |
| 32 | 32 | programs considerably longer and wastes valuable screen space, making it harder | |
| 33 | 33 | to get a good overview of a program. Ideally, a function should fit on one | |
| 34 | - screen (say, 20-30 lines). 20 lines of Python can do a lot more work than 20 | ||
| 34 | + screen (say, 20--30 lines). 20 lines of Python can do a lot more work than 20 | ||
| 35 | 35 | lines of C. This is not solely due to the lack of begin/end brackets -- the | |
| 36 | 36 | lack of declarations and the high-level data types are also responsible -- but | |
| 37 | 37 | the indentation-based syntax certainly helps. | |
@@ -77,7 +77,7 @@ which is exactly:: | |||
| 77 | 77 | ||
| 78 | 78 | 1.1999999999999999555910790149937383830547332763671875 (decimal) | |
| 79 | 79 | ||
| 80 | - The typical precision of 53 bits provides Python floats with 15-16 | ||
| 80 | + The typical precision of 53 bits provides Python floats with 15--16 | ||
| 81 | 81 | decimal digits of accuracy. | |
| 82 | 82 | ||
| 83 | 83 | For a fuller explanation, please see the :ref:`floating point arithmetic | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -252,7 +252,7 @@ outdated. | |||
| 252 | 252 | ||
| 253 | 253 | Guido van Rossum and Jelke de Boer, "Interactively Testing Remote Servers | |
| 254 | 254 | Using the Python Programming Language", CWI Quarterly, Volume 4, Issue 4 | |
| 255 | - (December 1991), Amsterdam, pp 283-303. | ||
| 255 | + (December 1991), Amsterdam, pp 283--303. | ||
| 256 | 256 | ||
| 257 | 257 | ||
| 258 | 258 | Are there any books on Python? | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -240,8 +240,8 @@ Error Codes | |||
| 240 | 240 | ~~~~~~~~~~~ | |
| 241 | 241 | ||
| 242 | 242 | Because the default handlers handle redirects (codes in the 300 range), and | |
| 243 | - codes in the 100-299 range indicate success, you will usually only see error | ||
| 244 | - codes in the 400-599 range. | ||
| 243 | + codes in the 100--299 range indicate success, you will usually only see error | ||
| 244 | + codes in the 400--599 range. | ||
| 245 | 245 | ||
| 246 | 246 | :attr:`http.server.BaseHTTPRequestHandler.responses` is a useful dictionary of | |
| 247 | 247 | response codes in that shows all the response codes used by RFC 2616. The | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -47,7 +47,7 @@ it's the base calendar for all computations. | |||
| 47 | 47 | ||
| 48 | 48 | .. method:: itermonthdates(year, month) | |
| 49 | 49 | ||
| 50 | - Return an iterator for the month *month* (1-12) in the year *year*. This | ||
| 50 | + Return an iterator for the month *month* (1--12) in the year *year*. This | ||
| 51 | 51 | iterator will return all days (as :class:`datetime.date` objects) for the | |
| 52 | 52 | month and all days before the start of the month or after the end of the | |
| 53 | 53 | month that are required to get a complete week. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -275,6 +275,6 @@ cuts for numerical purposes, a good reference should be the following: | |||
| 275 | 275 | ||
| 276 | 276 | Kahan, W: Branch cuts for complex elementary functions; or, Much ado about | |
| 277 | 277 | nothing's sign bit. In Iserles, A., and Powell, M. (eds.), The state of the art | |
| 278 | - in numerical analysis. Clarendon Press (1987) pp165-211. | ||
| 278 | + in numerical analysis. Clarendon Press (1987) pp165--211. | ||
| 279 | 279 | ||
| 280 | 280 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -858,7 +858,7 @@ Encodings and Unicode | |||
| 858 | 858 | --------------------- | |
| 859 | 859 | ||
| 860 | 860 | Strings are stored internally as sequences of code points in | |
| 861 | - range ``0x0``-``0x10FFFF``. (See :pep:`393` for | ||
| 861 | + range ``0x0``--``0x10FFFF``. (See :pep:`393` for | ||
| 862 | 862 | more details about the implementation.) | |
| 863 | 863 | Once a string object is used outside of CPU and memory, endianness | |
| 864 | 864 | and how these arrays are stored as bytes become an issue. As with other | |
@@ -868,7 +868,7 @@ There are a variety of different text serialisation codecs, which are | |||
| 868 | 868 | collectivity referred to as :term:`text encodings <text encoding>`. | |
| 869 | 869 | ||
| 870 | 870 | The simplest text encoding (called ``'latin-1'`` or ``'iso-8859-1'``) maps | |
| 871 | - the code points 0-255 to the bytes ``0x0``-``0xff``, which means that a string | ||
| 871 | + the code points 0--255 to the bytes ``0x0``--``0xff``, which means that a string | ||
| 872 | 872 | object that contains code points above ``U+00FF`` can't be encoded with this | |
| 873 | 873 | codec. Doing so will raise a :exc:`UnicodeEncodeError` that looks | |
| 874 | 874 | like the following (although the details of the error message may differ): | |
@@ -877,7 +877,7 @@ position 3: ordinal not in range(256)``. | |||
| 877 | 877 | ||
| 878 | 878 | There's another group of encodings (the so called charmap encodings) that choose | |
| 879 | 879 | a different subset of all Unicode code points and how these code points are | |
| 880 | - mapped to the bytes ``0x0``-``0xff``. To see how this is done simply open | ||
| 880 | + mapped to the bytes ``0x0``--``0xff``. To see how this is done simply open | ||
| 881 | 881 | e.g. :file:`encodings/cp1252.py` (which is an encoding that is used primarily on | |
| 882 | 882 | Windows). There's a string constant with 256 characters that shows you which | |
| 883 | 883 | character is mapped to which byte value. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -213,7 +213,7 @@ it returns a string. | |||
| 213 | 213 | ||
| 214 | 214 | Return a string representation of the ASCII character *c*. If *c* is printable, | |
| 215 | 215 | this string is the character itself. If the character is a control character | |
| 216 | - (0x00-0x1f) the string consists of a caret (``'^'``) followed by the | ||
| 216 | + (0x00--0x1f) the string consists of a caret (``'^'``) followed by the | ||
| 217 | 217 | corresponding uppercase letter. If the character is an ASCII delete (0x7f) the | |
| 218 | 218 | string is ``'^?'``. If the character has its meta bit (0x80) set, the meta bit | |
| 219 | 219 | is stripped, the preceding rules applied, and ``'!'`` prepended to the result. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -316,7 +316,7 @@ The module :mod:`curses` defines the following functions: | |||
| 316 | 316 | Return the name of the key numbered *k*. The name of a key generating printable | |
| 317 | 317 | ASCII character is the key's character. The name of a control-key combination | |
| 318 | 318 | is a two-character string consisting of a caret followed by the corresponding | |
| 319 | - printable ASCII character. The name of an alt-key combination (128-255) is a | ||
| 319 | + printable ASCII character. The name of an alt-key combination (128--255) is a | ||
| 320 | 320 | string consisting of the prefix 'M-' followed by the name of the corresponding | |
| 321 | 321 | ASCII character. | |
| 322 | 322 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -686,7 +686,7 @@ are always available. They are listed here in alphabetical order. | |||
| 686 | 686 | preceded by ``+`` or ``-`` (with no space in between) and surrounded by | |
| 687 | 687 | whitespace. A base-n literal consists of the digits 0 to n-1, with ``a`` | |
| 688 | 688 | to ``z`` (or ``A`` to ``Z``) having | |
| 689 | - values 10 to 35. The default *base* is 10. The allowed values are 0 and 2-36. | ||
| 689 | + values 10 to 35. The default *base* is 10. The allowed values are 0 and 2--36. | ||
| 690 | 690 | Base-2, -8, and -16 literals can be optionally prefixed with ``0b``/``0B``, | |
| 691 | 691 | ``0o``/``0O``, or ``0x``/``0X``, as with integer literals in code. Base 0 | |
| 692 | 692 | means to interpret exactly as a code literal, so that the actual base is 2, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -99,7 +99,7 @@ write code that handles both IP versions correctly. | |||
| 99 | 99 | The following constitutes a valid IPv4 address: | |
| 100 | 100 | ||
| 101 | 101 | 1. A string in decimal-dot notation, consisting of four decimal integers in | |
| 102 | - the inclusive range 0-255, separated by dots (e.g. ``192.168.0.1``). Each | ||
| 102 | + the inclusive range 0--255, separated by dots (e.g. ``192.168.0.1``). Each | ||
| 103 | 103 | integer represents an octet (byte) in the address. Leading zeroes are | |
| 104 | 104 | tolerated only for values less than 8 (as there is no ambiguity | |
| 105 | 105 | between the decimal and octal interpretations of such strings). | |
| Back | FazBrowse Home | New Git URL |
0 commit comments