Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

3.7 howto descriptor#353

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
JulienPalard merged 6 commits intopython:3.7fromoboudou:3.7_howto_descriptor
Oct 5, 2018
Merged

Conversation

@oboudou
Copy link
Contributor

No description provided.

"recherchée est un objet définissant l'une des méthodes de descripteur, "
"Python peut substituer le comportement par défaut et appeler à la place la "
"méthode Descriptor. Lorsque cela se produit dans la chaîne de précédence "
"dépend de quelles méthodes descripteur ont été définies."

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

peut-etre uns a descripteur dans la ligne 107

"different calls to :meth:`__get__`."
msgstr""
":méth:`objet.__getattribute__` et :méth:`type.__getattribute__` font "
"différents appels à:méth:`__get__`."

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

il manque un espace apresà

#:../Doc/howto/descriptor.rst:3
msgid"Descriptor HowTo Guide"
msgstr""
msgstr"Descripteur Guide HowTo"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Guide pour l'utilisation des descripteurs ?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

merci

"methods. Shows how each works by giving a pure Python equivalent and a "
"sample application."
msgstr""
"Définit les descripteurs, résume le protocole et montre comment les "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Je ne sais pas si l'on est obligé de coller au style télégraphique de Raymond. There must be a better way ! et je tape du poing sur la table.
Bref, je pense que l'on peut construire de vraies phrases

"En général, un descripteur est un attribut objet avec un\"comportement "
"contraignant\", dont l'accès à l'attribut a été remplacé par des méthodes "
"dans le protocole du descripteur. Ces méthodes sont : :méth:`__get__`, :"
"méth:`__set__`, et :méth:`__delete__`. Si l'une de ces méthodes est définie "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

En français, il est d'usage de ne pas mettre de virgule avant le 'et'.

msgstr""
"Le comportement par défaut pour l'accès aux attributs consiste à obtenir, "
"définir ou supprimer l'attribut du dictionnaire d'un objet. Par exemple, ' "
"'a. x' 'a une chaîne de recherche commençant par' 'a. __dict__ ['x'] ' ', "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

pour 'a.x', Python commence par rechercher dans ...

"Le comportement par défaut pour l'accès aux attributs consiste à obtenir, "
"définir ou supprimer l'attribut du dictionnaire d'un objet. Par exemple, ' "
"'a. x' 'a une chaîne de recherche commençant par' 'a. __dict__ ['x'] ' ', "
"puis' 'type (a). __dict__ ['x'] ' ', et continuant à travers les classes de "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

... puis continue en cherchant dans les classes ....

"base de' 'type (a) ' 'À l'exclusion des sous-classes. Si la valeur "
"recherchée est un objet définissant l'une des méthodes de descripteur, "
"Python peut substituer le comportement par défaut et appeler à la place la "
"méthode Descriptor. Lorsque cela se produit dans la chaîne de précédence "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

la méthode correspondante du descripteur. Le moment où ce comportement est adopté dépend de la chaîne de précédence et des endroits où les méthodes descripteur ont été définies.

"L'objet retourné par ``super()`` a aussi une méthode personnalisée :meth:"
"`__getattribute__` pour appeler les descripteurs. L'appel ``super(B, obj)."
"m()`` recherche ``obj.__class__.__mro__`` pour la classe de base ``A`` "
"immédiatement après ``B`` et retourne ensuite ``A.__dict__['m'].__get__(obj, "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

La documentation française préfère "renvoie" à "retourne" (voir glossaire).

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

merci

@JulienPalardJulienPalard merged commit740eb9c intopython:3.7Oct 5, 2018
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

2 more reviewers

@amiroucheamiroucheamirouche left review comments

@christopheNanchristopheNanchristopheNan requested changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@oboudou@amirouche@christopheNan@JulienPalard

[8]ページ先頭

©2009-2025 Movatter.jp