summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGnomino <gnomino@gnomino.eu>2015-10-11 13:47:44 +0200
committerGnomino <gnomino@gnomino.eu>2015-10-11 13:47:44 +0200
commit097c839b7bbf03dd2ee50c9ccabde147e6bf285e (patch)
treeeb88d4249c5f2ef0399d91879d2a130f41d1971f
parentaad7eb82dd34c53dcdf15a8ea34dbee0df066bcc (diff)
Changed way of creating classes
-rw-r--r--fr-fr/python3-fr.html.markdown4
-rw-r--r--python3.html.markdown4
2 files changed, 4 insertions, 4 deletions
diff --git a/fr-fr/python3-fr.html.markdown b/fr-fr/python3-fr.html.markdown
index b687143c..22256efc 100644
--- a/fr-fr/python3-fr.html.markdown
+++ b/fr-fr/python3-fr.html.markdown
@@ -570,8 +570,8 @@ filter(lambda x: x > 5, [3, 4, 5, 6, 7]) # => [6, 7]
####################################################
-# On hérite de object pour créer une classe
-class Human(object):
+# On utilise l'opérateur "classe" pour définir une classe
+class Human:
# Un attribut de la classe. Il est partagé par toutes les instances de la classe.
species = "H. sapiens"
diff --git a/python3.html.markdown b/python3.html.markdown
index cd1a83cc..5a992b54 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"