| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| 2 | <html> |
| 3 | <head> |
| 4 | <link rel="STYLESHEET" href="lib.css" type='text/css' /> |
| 5 | <link rel="SHORTCUT ICON" href="../icons/pyfav.png" type="image/png" /> |
| 6 | <link rel='start' href='../index.html' title='Python Documentation Index' /> |
| 7 | <link rel="first" href="lib.html" title='Python Library Reference' /> |
| 8 | <link rel='contents' href='contents.html' title="Contents" /> |
| 9 | <link rel='index' href='genindex.html' title='Index' /> |
| 10 | <link rel='last' href='about.html' title='About this document...' /> |
| 11 | <link rel='help' href='about.html' title='About this document...' /> |
| 12 | <link rel="next" href="node109.html" /> |
| 13 | <link rel="prev" href="module-string.html" /> |
| 14 | <link rel="parent" href="module-string.html" /> |
| 15 | <link rel="next" href="node109.html" /> |
| 16 | <meta name='aesop' content='information' /> |
| 17 | <title>4.1.1 String constants</title> |
| 18 | </head> |
| 19 | <body> |
| 20 | <DIV CLASS="navigation"> |
| 21 | <div id='top-navigation-panel' xml:id='top-navigation-panel'> |
| 22 | <table align="center" width="100%" cellpadding="0" cellspacing="2"> |
| 23 | <tr> |
| 24 | <td class='online-navigation'><a rel="prev" title="4.1 string " |
| 25 | href="module-string.html"><img src='../icons/previous.png' |
| 26 | border='0' height='32' alt='Previous Page' width='32' /></A></td> |
| 27 | <td class='online-navigation'><a rel="parent" title="4.1 string " |
| 28 | href="module-string.html"><img src='../icons/up.png' |
| 29 | border='0' height='32' alt='Up One Level' width='32' /></A></td> |
| 30 | <td class='online-navigation'><a rel="next" title="4.1.2 Template strings" |
| 31 | href="node109.html"><img src='../icons/next.png' |
| 32 | border='0' height='32' alt='Next Page' width='32' /></A></td> |
| 33 | <td align="center" width="100%">Python Library Reference</td> |
| 34 | <td class='online-navigation'><a rel="contents" title="Table of Contents" |
| 35 | href="contents.html"><img src='../icons/contents.png' |
| 36 | border='0' height='32' alt='Contents' width='32' /></A></td> |
| 37 | <td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png' |
| 38 | border='0' height='32' alt='Module Index' width='32' /></a></td> |
| 39 | <td class='online-navigation'><a rel="index" title="Index" |
| 40 | href="genindex.html"><img src='../icons/index.png' |
| 41 | border='0' height='32' alt='Index' width='32' /></A></td> |
| 42 | </tr></table> |
| 43 | <div class='online-navigation'> |
| 44 | <b class="navlabel">Previous:</b> |
| 45 | <a class="sectref" rel="prev" href="module-string.html">4.1 string </A> |
| 46 | <b class="navlabel">Up:</b> |
| 47 | <a class="sectref" rel="parent" href="module-string.html">4.1 string </A> |
| 48 | <b class="navlabel">Next:</b> |
| 49 | <a class="sectref" rel="next" href="node109.html">4.1.2 Template strings</A> |
| 50 | </div> |
| 51 | <hr /></div> |
| 52 | </DIV> |
| 53 | <!--End of Navigation Panel--> |
| 54 | |
| 55 | <H2><A NAME="SECTION006110000000000000000"> |
| 56 | 4.1.1 String constants</A> |
| 57 | </H2> |
| 58 | |
| 59 | <P> |
| 60 | The constants defined in this module are: |
| 61 | |
| 62 | <P> |
| 63 | <dl><dt><b><tt id='l2h-818' xml:id='l2h-818'>ascii_letters</tt></b></dt> |
| 64 | <dd> |
| 65 | The concatenation of the <tt class="constant">ascii_lowercase</tt> and |
| 66 | <tt class="constant">ascii_uppercase</tt> constants described below. This value is |
| 67 | not locale-dependent. |
| 68 | </dd></dl> |
| 69 | |
| 70 | <P> |
| 71 | <dl><dt><b><tt id='l2h-819' xml:id='l2h-819'>ascii_lowercase</tt></b></dt> |
| 72 | <dd> |
| 73 | The lowercase letters <code>'abcdefghijklmnopqrstuvwxyz'</code>. This |
| 74 | value is not locale-dependent and will not change. |
| 75 | </dd></dl> |
| 76 | |
| 77 | <P> |
| 78 | <dl><dt><b><tt id='l2h-820' xml:id='l2h-820'>ascii_uppercase</tt></b></dt> |
| 79 | <dd> |
| 80 | The uppercase letters <code>'ABCDEFGHIJKLMNOPQRSTUVWXYZ'</code>. This |
| 81 | value is not locale-dependent and will not change. |
| 82 | </dd></dl> |
| 83 | |
| 84 | <P> |
| 85 | <dl><dt><b><tt id='l2h-821' xml:id='l2h-821'>digits</tt></b></dt> |
| 86 | <dd> |
| 87 | The string <code>'0123456789'</code>. |
| 88 | </dd></dl> |
| 89 | |
| 90 | <P> |
| 91 | <dl><dt><b><tt id='l2h-822' xml:id='l2h-822'>hexdigits</tt></b></dt> |
| 92 | <dd> |
| 93 | The string <code>'0123456789abcdefABCDEF'</code>. |
| 94 | </dd></dl> |
| 95 | |
| 96 | <P> |
| 97 | <dl><dt><b><tt id='l2h-823' xml:id='l2h-823'>letters</tt></b></dt> |
| 98 | <dd> |
| 99 | The concatenation of the strings <tt class="constant">lowercase</tt> and |
| 100 | <tt class="constant">uppercase</tt> described below. The specific value is |
| 101 | locale-dependent, and will be updated when |
| 102 | <tt class="function">locale.setlocale()</tt> is called. |
| 103 | </dd></dl> |
| 104 | |
| 105 | <P> |
| 106 | <dl><dt><b><tt id='l2h-824' xml:id='l2h-824'>lowercase</tt></b></dt> |
| 107 | <dd> |
| 108 | A string containing all the characters that are considered lowercase |
| 109 | letters. On most systems this is the string |
| 110 | <code>'abcdefghijklmnopqrstuvwxyz'</code>. Do not change its definition -- |
| 111 | the effect on the routines <tt class="function">upper()</tt> and |
| 112 | <tt class="function">swapcase()</tt> is undefined. The specific value is |
| 113 | locale-dependent, and will be updated when |
| 114 | <tt class="function">locale.setlocale()</tt> is called. |
| 115 | </dd></dl> |
| 116 | |
| 117 | <P> |
| 118 | <dl><dt><b><tt id='l2h-825' xml:id='l2h-825'>octdigits</tt></b></dt> |
| 119 | <dd> |
| 120 | The string <code>'01234567'</code>. |
| 121 | </dd></dl> |
| 122 | |
| 123 | <P> |
| 124 | <dl><dt><b><tt id='l2h-826' xml:id='l2h-826'>punctuation</tt></b></dt> |
| 125 | <dd> |
| 126 | String of ASCII characters which are considered punctuation |
| 127 | characters in the "<tt class="samp">C</tt>" locale. |
| 128 | </dd></dl> |
| 129 | |
| 130 | <P> |
| 131 | <dl><dt><b><tt id='l2h-827' xml:id='l2h-827'>printable</tt></b></dt> |
| 132 | <dd> |
| 133 | String of characters which are considered printable. This is a |
| 134 | combination of <tt class="constant">digits</tt>, <tt class="constant">letters</tt>, |
| 135 | <tt class="constant">punctuation</tt>, and <tt class="constant">whitespace</tt>. |
| 136 | </dd></dl> |
| 137 | |
| 138 | <P> |
| 139 | <dl><dt><b><tt id='l2h-828' xml:id='l2h-828'>uppercase</tt></b></dt> |
| 140 | <dd> |
| 141 | A string containing all the characters that are considered uppercase |
| 142 | letters. On most systems this is the string |
| 143 | <code>'ABCDEFGHIJKLMNOPQRSTUVWXYZ'</code>. Do not change its definition -- |
| 144 | the effect on the routines <tt class="function">lower()</tt> and |
| 145 | <tt class="function">swapcase()</tt> is undefined. The specific value is |
| 146 | locale-dependent, and will be updated when |
| 147 | <tt class="function">locale.setlocale()</tt> is called. |
| 148 | </dd></dl> |
| 149 | |
| 150 | <P> |
| 151 | <dl><dt><b><tt id='l2h-829' xml:id='l2h-829'>whitespace</tt></b></dt> |
| 152 | <dd> |
| 153 | A string containing all characters that are considered whitespace. |
| 154 | On most systems this includes the characters space, tab, linefeed, |
| 155 | return, formfeed, and vertical tab. Do not change its definition -- |
| 156 | the effect on the routines <tt class="function">strip()</tt> and <tt class="function">split()</tt> |
| 157 | is undefined. |
| 158 | </dd></dl> |
| 159 | |
| 160 | <P> |
| 161 | |
| 162 | <DIV CLASS="navigation"> |
| 163 | <div class='online-navigation'> |
| 164 | <p></p><hr /> |
| 165 | <table align="center" width="100%" cellpadding="0" cellspacing="2"> |
| 166 | <tr> |
| 167 | <td class='online-navigation'><a rel="prev" title="4.1 string " |
| 168 | href="module-string.html"><img src='../icons/previous.png' |
| 169 | border='0' height='32' alt='Previous Page' width='32' /></A></td> |
| 170 | <td class='online-navigation'><a rel="parent" title="4.1 string " |
| 171 | href="module-string.html"><img src='../icons/up.png' |
| 172 | border='0' height='32' alt='Up One Level' width='32' /></A></td> |
| 173 | <td class='online-navigation'><a rel="next" title="4.1.2 Template strings" |
| 174 | href="node109.html"><img src='../icons/next.png' |
| 175 | border='0' height='32' alt='Next Page' width='32' /></A></td> |
| 176 | <td align="center" width="100%">Python Library Reference</td> |
| 177 | <td class='online-navigation'><a rel="contents" title="Table of Contents" |
| 178 | href="contents.html"><img src='../icons/contents.png' |
| 179 | border='0' height='32' alt='Contents' width='32' /></A></td> |
| 180 | <td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png' |
| 181 | border='0' height='32' alt='Module Index' width='32' /></a></td> |
| 182 | <td class='online-navigation'><a rel="index" title="Index" |
| 183 | href="genindex.html"><img src='../icons/index.png' |
| 184 | border='0' height='32' alt='Index' width='32' /></A></td> |
| 185 | </tr></table> |
| 186 | <div class='online-navigation'> |
| 187 | <b class="navlabel">Previous:</b> |
| 188 | <a class="sectref" rel="prev" href="module-string.html">4.1 string </A> |
| 189 | <b class="navlabel">Up:</b> |
| 190 | <a class="sectref" rel="parent" href="module-string.html">4.1 string </A> |
| 191 | <b class="navlabel">Next:</b> |
| 192 | <a class="sectref" rel="next" href="node109.html">4.1.2 Template strings</A> |
| 193 | </div> |
| 194 | </div> |
| 195 | <hr /> |
| 196 | <span class="release-info">Release 2.4.2, documentation updated on 28 September 2005.</span> |
| 197 | </DIV> |
| 198 | <!--End of Navigation Panel--> |
| 199 | <ADDRESS> |
| 200 | See <i><a href="about.html">About this document...</a></i> for information on suggesting changes. |
| 201 | </ADDRESS> |
| 202 | </BODY> |
| 203 | </HTML> |