-
Notifications
You must be signed in to change notification settings - Fork 266
howto/descriptor : correction d'une fuzzy et de qq erreurs #1216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
71ad6a0
to
fd84492
Compare
howto/descriptor.po
Outdated
"L'objet renvoyé par ``super()`` a également une méthode personnalisée :meth:" | ||
"`__getattribute__` pour invoquer des descripteurs. La recherche d'attribut " | ||
"``super(B, obj).m`` recherche ``obj.__class__.__mro__`` pour la classe de " | ||
"base ``A`` parente directe de ``B`` et renvoie ensuite ``A.__dict__['m']." | ||
"__get__(obj, B)``. Si ce n'est pas un descripteur, ``m`` est renvoyé " | ||
"inchangé. S'il n'est pas dans le dictionnaire, ``m`` se rabat sur une " | ||
"recherche utilisant :meth:`objet.__getattribut__`." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super chaud !
Il me faudrait le code source pour être sûr. Le premier qui trouve publie le lien, merci.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ouais je crois que j'ai passé 20 minutes entières sur ce seul bloc pour être sûr qu'il ait un sens. Le code source de ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getattribute renvoyé par super.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Les soulignés ont été remplacés par une mise en gras.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alors ça devrait être ça, bonne chance pour comprendre : https://github.com/python/cpython/blob/016bdd519d76c282bbe0220c67a49226b6262638/Objects/typeobject.c#L7888
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je comprends :
« La recherche d'attribut super(B, obj).m recherche dans obj.class.mro la classe qui suit immédiatement B, appelons la A, et renvoie A.dict['m'].get(obj, B). ».
Et pour la dernière phrase : « S'il n'est pas dans le dictionnaire, trouver m
se rabat sur … ».
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Très bien vu. Je corrige ça
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je trouve que c'est pas très français, « trouver m se rabat sur une recherche utilisant [...] ». Est-ce qu'une action peut se rabattre ? En même temps, la phrase d'origine en anglais comporte cette maladresse. Que suggères-tu, @christopheNan ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
« S'il n'est pas dans le dictionnaire, la recherche de m revient à une recherche utilisant :meth:objet.__getattribute__
. »
Je cherchais quelque chose d'encore meilleur que ce qu'avait suggéré Christophe mais je ne trouve pas. Finissons-en |
Bizarre, la CI ne détecte pas la coquille sur :meth: |
Co-authored-by: Christophe Nanteuil <[email protected]>
Merci ! |
une simple correction de fuzzy m'a permis de constater au moins 4 erreurs rien que dans la même section. Le fichier est pas bien traduit, c'est une révision totale qu'il lui faut