mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 09:41:36 +00:00
[python3/en] Fix two "getter" output examples (#2658)
This commit is contained in:
parent
a612d54b0b
commit
56a18f79cf
@ -729,8 +729,8 @@ if __name__ == '__main__':
|
||||
# Update the property for this instance
|
||||
i.age = 42
|
||||
# Get the property
|
||||
i.say(i.age) # => 42
|
||||
j.say(j.age) # => 0
|
||||
i.say(i.age) # => "Ian: 42"
|
||||
j.say(j.age) # => "Joel: 0"
|
||||
# Delete the property
|
||||
del i.age
|
||||
# i.age # => this would raise an AttributeError
|
||||
|
Loading…
Reference in New Issue
Block a user