| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f954c4b commit a26f8ca
37 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -144,13 +144,6 @@ the Python configuration. | |||
| 144 | 144 | ||
| 145 | 145 | Return 1 or 0 depending on whether *ch* is an alphanumeric character. | |
| 146 | 146 | ||
| 147 | - .. cfunction:: int Py_UNICODE_ISPRINTABLE(Py_UNICODE ch) | ||
| 148 | - | ||
| 149 | - Return 1 or 0 depending on whether *ch* is a printable character. | ||
| 150 | - Characters defined in the Unicode character database as "Other" | ||
| 151 | - or "Separator" other than ASCII space(0x20) are not considered | ||
| 152 | - printable. | ||
| 153 | - | ||
| 154 | 147 | These APIs can be used for fast direct character conversions: | |
| 155 | 148 | ||
| 156 | 149 | ||
@@ -235,9 +228,6 @@ APIs: | |||
| 235 | 228 | +===================+=====================+================================+ | |
| 236 | 229 | | :attr:`%%` | *n/a* | The literal % character. | | |
| 237 | 230 | +-------------------+---------------------+--------------------------------+ | |
| 238 | - | :attr:`%a` | PyObject\* | The result of calling | | ||
| 239 | - | | | :func:`ascii`. | | ||
| 240 | - +-------------------+---------------------+--------------------------------+ | ||
| 241 | 231 | | :attr:`%c` | int | A single character, | | |
| 242 | 232 | | | | represented as an C int. | | |
| 243 | 233 | +-------------------+---------------------+--------------------------------+ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -91,14 +91,6 @@ are always available. They are listed here in alphabetical order. | |||
| 91 | 91 | return False | |
| 92 | 92 | ||
| 93 | 93 | ||
| 94 | - .. function:: ascii(object) | ||
| 95 | - | ||
| 96 | - As :func:`repr`, return a string containing a printable | ||
| 97 | - representation of an object. But unlike :func:`repr`, the non-ASCII | ||
| 98 | - characters in the string returned by :func:`ascii`() are hex-escaped | ||
| 99 | - to generate a same string as :func:`repr` in Python 2. | ||
| 100 | - | ||
| 101 | - | ||
| 102 | 94 | .. function:: bin(x) | |
| 103 | 95 | ||
| 104 | 96 | Convert an integer number to a binary string. The result is a valid Python | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -774,14 +774,6 @@ functions based on regular expressions. | |||
| 774 | 774 | least one cased character, false otherwise. | |
| 775 | 775 | ||
| 776 | 776 | ||
| 777 | - .. method:: str.isprintable() | ||
| 778 | - | ||
| 779 | - Return true if all characters in the string are printable and there is at | ||
| 780 | - least one character, false otherwise. Characters defined in the Unicode | ||
| 781 | - character database as "Other" or "Separator" other than ASCII space(0x20) are | ||
| 782 | - not considered printable. | ||
| 783 | - | ||
| 784 | - | ||
| 785 | 777 | .. method:: str.isspace() | |
| 786 | 778 | ||
| 787 | 779 | Return true if there are only whitespace characters in the string and there is | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -231,6 +231,8 @@ always available. | |||
| 231 | 231 | +------------------------------+------------------------------------------+ | |
| 232 | 232 | | :const:`ignore_environment` | -E | | |
| 233 | 233 | +------------------------------+------------------------------------------+ | |
| 234 | + | :const:`tabcheck` | -t or -tt | | ||
| 235 | + +------------------------------+------------------------------------------+ | ||
| 234 | 236 | | :const:`verbose` | -v | | |
| 235 | 237 | +------------------------------+------------------------------------------+ | |
| 236 | 238 | | :const:`unicode` | -U | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -222,6 +222,13 @@ Miscellaneous options | |||
| 222 | 222 | manipulations of :data:`sys.path` that it entails. | |
| 223 | 223 | ||
| 224 | 224 | ||
| 225 | + .. cmdoption:: -t | ||
| 226 | + | ||
| 227 | + Issue a warning when a source file mixes tabs and spaces for indentation in a | ||
| 228 | + way that makes it depend on the worth of a tab expressed in spaces. Issue an | ||
| 229 | + error when the option is given twice (:option:`-tt`). | ||
| 230 | + | ||
| 231 | + | ||
| 225 | 232 | .. cmdoption:: -u | |
| 226 | 233 | ||
| 227 | 234 | Force stdin, stdout and stderr to be totally unbuffered. On systems where it | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,6 +14,7 @@ PyAPI_DATA(int) Py_NoSiteFlag; | |||
| 14 | 14 | PyAPI_DATA(int) Py_BytesWarningFlag; | |
| 15 | 15 | PyAPI_DATA(int) Py_UseClassExceptionsFlag; | |
| 16 | 16 | PyAPI_DATA(int) Py_FrozenFlag; | |
| 17 | + PyAPI_DATA(int) Py_TabcheckFlag; | ||
| 17 | 18 | PyAPI_DATA(int) Py_IgnoreEnvironmentFlag; | |
| 18 | 19 | PyAPI_DATA(int) Py_DivisionWarningFlag; | |
| 19 | 20 | PyAPI_DATA(int) Py_DontWriteBytecodeFlag; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -217,7 +217,6 @@ typedef PY_UNICODE_TYPE Py_UNICODE; | |||
| 217 | 217 | # define _PyUnicode_IsLinebreak _PyUnicodeUCS2_IsLinebreak | |
| 218 | 218 | # define _PyUnicode_IsLowercase _PyUnicodeUCS2_IsLowercase | |
| 219 | 219 | # define _PyUnicode_IsNumeric _PyUnicodeUCS2_IsNumeric | |
| 220 | - # define _PyUnicode_IsPrintable _PyUnicodeUCS2_IsPrintable | ||
| 221 | 220 | # define _PyUnicode_IsTitlecase _PyUnicodeUCS2_IsTitlecase | |
| 222 | 221 | # define _PyUnicode_IsXidStart _PyUnicodeUCS2_IsXidStart | |
| 223 | 222 | # define _PyUnicode_IsXidContinue _PyUnicodeUCS2_IsXidContinue | |
@@ -312,7 +311,6 @@ typedef PY_UNICODE_TYPE Py_UNICODE; | |||
| 312 | 311 | # define _PyUnicode_IsLinebreak _PyUnicodeUCS4_IsLinebreak | |
| 313 | 312 | # define _PyUnicode_IsLowercase _PyUnicodeUCS4_IsLowercase | |
| 314 | 313 | # define _PyUnicode_IsNumeric _PyUnicodeUCS4_IsNumeric | |
| 315 | - # define _PyUnicode_IsPrintable _PyUnicodeUCS4_IsPrintable | ||
| 316 | 314 | # define _PyUnicode_IsTitlecase _PyUnicodeUCS4_IsTitlecase | |
| 317 | 315 | # define _PyUnicode_IsXidStart _PyUnicodeUCS4_IsXidStart | |
| 318 | 316 | # define _PyUnicode_IsXidContinue _PyUnicodeUCS4_IsXidContinue | |
@@ -353,7 +351,6 @@ typedef PY_UNICODE_TYPE Py_UNICODE; | |||
| 353 | 351 | #define Py_UNICODE_ISDECIMAL(ch) _PyUnicode_IsDecimalDigit(ch) | |
| 354 | 352 | #define Py_UNICODE_ISDIGIT(ch) _PyUnicode_IsDigit(ch) | |
| 355 | 353 | #define Py_UNICODE_ISNUMERIC(ch) _PyUnicode_IsNumeric(ch) | |
| 356 | - #define Py_UNICODE_ISPRINTABLE(ch) _PyUnicode_IsPrintable(ch) | ||
| 357 | 354 | ||
| 358 | 355 | #define Py_UNICODE_TODECIMAL(ch) _PyUnicode_ToDecimalDigit(ch) | |
| 359 | 356 | #define Py_UNICODE_TODIGIT(ch) _PyUnicode_ToDigit(ch) | |
@@ -384,7 +381,6 @@ extern const unsigned char _Py_ascii_whitespace[]; | |||
| 384 | 381 | #define Py_UNICODE_ISDECIMAL(ch) _PyUnicode_IsDecimalDigit(ch) | |
| 385 | 382 | #define Py_UNICODE_ISDIGIT(ch) _PyUnicode_IsDigit(ch) | |
| 386 | 383 | #define Py_UNICODE_ISNUMERIC(ch) _PyUnicode_IsNumeric(ch) | |
| 387 | - #define Py_UNICODE_ISPRINTABLE(ch) _PyUnicode_IsPrintable(ch) | ||
| 388 | 384 | ||
| 389 | 385 | #define Py_UNICODE_TODECIMAL(ch) _PyUnicode_ToDecimalDigit(ch) | |
| 390 | 386 | #define Py_UNICODE_TODIGIT(ch) _PyUnicode_ToDigit(ch) | |
@@ -1503,10 +1499,6 @@ PyAPI_FUNC(int) _PyUnicode_IsNumeric( | |||
| 1503 | 1499 | Py_UNICODE ch /* Unicode character */ | |
| 1504 | 1500 | ); | |
| 1505 | 1501 | ||
| 1506 | - PyAPI_FUNC(int) _PyUnicode_IsPrintable( | ||
| 1507 | - Py_UNICODE ch /* Unicode character */ | ||
| 1508 | - ); | ||
| 1509 | - | ||
| 1510 | 1502 | PyAPI_FUNC(int) _PyUnicode_IsAlpha( | |
| 1511 | 1503 | Py_UNICODE ch /* Unicode character */ | |
| 1512 | 1504 | ); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1441,13 +1441,6 @@ class OutputChecker: | |||
| 1441 | 1441 | and returns true if they match; and `output_difference`, which | |
| 1442 | 1442 | returns a string describing the differences between two outputs. | |
| 1443 | 1443 | """ | |
| 1444 | - | ||
| 1445 | - def _toAscii(self, s): | ||
| 1446 | - """ | ||
| 1447 | - Convert string to hex-escaped ASCII string. | ||
| 1448 | - """ | ||
| 1449 | - return str(s.encode('ASCII', 'backslashreplace'), "ASCII") | ||
| 1450 | - | ||
| 1451 | 1444 | def check_output(self, want, got, optionflags): | |
| 1452 | 1445 | """ | |
| 1453 | 1446 | Return True iff the actual output from an example (`got`) | |
@@ -1458,15 +1451,6 @@ def check_output(self, want, got, optionflags): | |||
| 1458 | 1451 | documentation for `TestRunner` for more information about | |
| 1459 | 1452 | option flags. | |
| 1460 | 1453 | """ | |
| 1461 | - | ||
| 1462 | - # If `want` contains hex-escaped character such as "\u1234", | ||
| 1463 | - # then `want` is a string of six characters(e.g. [\,u,1,2,3,4]). | ||
| 1464 | - # On the other hand, `got` could be an another sequence of | ||
| 1465 | - # characters such as [\u1234], so `want` and `got` should | ||
| 1466 | - # be folded to hex-escaped ASCII string to compare. | ||
| 1467 | - got = self._toAscii(got) | ||
| 1468 | - want = self._toAscii(want) | ||
| 1469 | - | ||
| 1470 | 1454 | # Handle the common case first, for efficiency: | |
| 1471 | 1455 | # if they're string-identical, always return true. | |
| 1472 | 1456 | if got == want: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -768,7 +768,7 @@ def test_unicode(self): | |||
| 768 | 768 | a = array.array('u', s) | |
| 769 | 769 | self.assertEqual( | |
| 770 | 770 | repr(a), | |
| 771 | - "array('u', '\\x00=\"\\'a\\\\b\\x80\xff\\x00\\x01\u1234')") | ||
| 771 | + "array('u', '\\x00=\"\\'a\\\\b\\x80\\xff\\x00\\x01\\u1234')") | ||
| 772 | 772 | ||
| 773 | 773 | self.assertRaises(TypeError, a.fromunicode) | |
| 774 | 774 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -159,9 +159,6 @@ def test_any(self): | |||
| 159 | 159 | S = [10, 20, 30] | |
| 160 | 160 | self.assertEqual(any(x > 42 for x in S), False) | |
| 161 | 161 | ||
| 162 | - def test_ascii(self): | ||
| 163 | - self.assertEqual(ascii("\u0370"), "'\\u0370'") | ||
| 164 | - | ||
| 165 | 162 | def test_neg(self): | |
| 166 | 163 | x = -sys.maxsize-1 | |
| 167 | 164 | self.assert_(isinstance(x, int)) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments