mirror of
https://github.com/boostorg/python.git
synced 2026-01-19 16:32:16 +00:00
@@ -127,7 +127,7 @@ void greet()
|
||||
|
||||
// Define greet function in Python.
|
||||
object result = exec(
|
||||
"def greet(self): \n"
|
||||
"def greet(): \n"
|
||||
" return 'Hello from Python!' \n",
|
||||
global, global);
|
||||
|
||||
@@ -144,7 +144,7 @@ void greet()
|
||||
we could also store it in an a file...</para>
|
||||
|
||||
<pre>
|
||||
def greet(self):
|
||||
def greet():
|
||||
return 'Hello from Python!'
|
||||
</pre>
|
||||
<para>... and execute that instead.</para>
|
||||
|
||||
Reference in New Issue
Block a user