Show More
@@ -192,15 +192,15 b' MAIN FEATURES' | |||
|
192 | 192 | 1. Auto-parentheses |
|
193 | 193 | Callable objects (i.e. functions, methods, etc) can be invoked like |
|
194 | 194 | this (notice the commas between the arguments): |
|
195 |
|
|
|
195 | In [1]: callable_ob arg1, arg2, arg3 | |
|
196 | 196 | and the input will be translated to this: |
|
197 | --> callable_ob(arg1, arg2, arg3) | |
|
197 | ------> callable_ob(arg1, arg2, arg3) | |
|
198 | 198 | You can force auto-parentheses by using '/' as the first character |
|
199 | 199 | of a line. For example: |
|
200 |
|
|
|
200 | In [1]: /globals # becomes 'globals()' | |
|
201 | 201 | Note that the '/' MUST be the first character on the line! This |
|
202 | 202 | won't work: |
|
203 |
|
|
|
203 | In [2]: print /globals # syntax error | |
|
204 | 204 | |
|
205 | 205 | In most cases the automatic algorithm should work, so you should |
|
206 | 206 | rarely need to explicitly invoke /. One notable exception is if you |
@@ -220,16 +220,16 b' MAIN FEATURES' | |||
|
220 | 220 | 2. Auto-Quoting |
|
221 | 221 | You can force auto-quoting of a function's arguments by using ',' as |
|
222 | 222 | the first character of a line. For example: |
|
223 |
|
|
|
223 | In [1]: ,my_function /home/me # becomes my_function("/home/me") | |
|
224 | 224 | |
|
225 | 225 | If you use ';' instead, the whole argument is quoted as a single |
|
226 | 226 | string (while ',' splits on whitespace): |
|
227 |
|
|
|
228 |
|
|
|
227 | In [2]: ,my_function a b c # becomes my_function("a","b","c") | |
|
228 | In [3]: ;my_function a b c # becomes my_function("a b c") | |
|
229 | 229 | |
|
230 | 230 | Note that the ',' MUST be the first character on the line! This |
|
231 | 231 | won't work: |
|
232 |
|
|
|
232 | In [4]: x = ,my_function /home/me # syntax error | |
|
233 | 233 | """ |
|
234 | 234 | |
|
235 | 235 | interactive_usage_min = """\ |
General Comments 0
You need to be logged in to leave comments.
Login now