File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -326,7 +326,7 @@ instance objects are attribute references. There are two kinds of valid
326326attribute names: data attributes and methods.
327327
328328*Data attributes * correspond to "instance variables" in Smalltalk, and to "data
329- members" in C++. Data attributes need not be declared; like local variables,
329+ members" in C++. Data attributes don't have to be declared like local variables,
330330they spring into existence when they are first assigned to. For example, if
331331``x `` is the instance of :class: `!MyClass ` created above, the following piece of
332332code will print the value ``16 ``, without leaving a trace::
@@ -367,7 +367,7 @@ object, and can be stored away and called at a later time. For example::
367367 while True:
368368 print(xf())
369369
370- will continue to print ``hello world `` until the end of time.
370+ will continue to print ``hello world `` until the end of time or when `` Ctrl + C `` is pressed .
371371
372372What exactly happens when a method is called? You may have noticed that
373373``x.f() `` was called without an argument above, even though the function
You can’t perform that action at this time.
0 commit comments