diff options
author | Cameron Wood <github@cbwood.net> | 2015-10-13 14:07:04 -0400 |
---|---|---|
committer | Cameron Wood <github@cbwood.net> | 2015-10-13 14:07:04 -0400 |
commit | 0ac8ac899b43eb017f8582d29bf7597fb2b285b1 (patch) | |
tree | 5d77057451ac78ac9e62da316c9d6066a7969412 /python3.html.markdown | |
parent | e32eb715ef41e411da0a91b40e6e35f150a9c2eb (diff) | |
parent | 59a07411effbd0ed6289e062621deb29fe8641a8 (diff) |
Merge remote-tracking branch 'refs/remotes/adambard/master'
Diffstat (limited to 'python3.html.markdown')
-rw-r--r-- | python3.html.markdown | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/python3.html.markdown b/python3.html.markdown index cd1a83cc..87fa0b70 100644 --- a/python3.html.markdown +++ b/python3.html.markdown @@ -569,8 +569,8 @@ filter(lambda x: x > 5, [3, 4, 5, 6, 7]) # => [6, 7] #################################################### -# We subclass from object to get a class. -class Human(object): +# We use the "class" operator to get a class +class Human: # A class attribute. It is shared by all instances of this class species = "H. sapiens" @@ -664,8 +664,6 @@ def double_numbers(iterable): # Instead of generating and returning all values at once it creates one in each # iteration. This means values bigger than 15 wont be processed in # double_numbers. -# Note range is a generator too. Creating a list 1-900000000 would take lot of -# time to be made # We use a trailing underscore in variable names when we want to use a name that # would normally collide with a python keyword range_ = range(1, 900000000) |