Message226496
| Author |
gvanrossum |
| Recipients |
andymaier, benjamin.peterson, chris.jerdonek, cvrebert, docs@python, ethan.furman, ezio.melotti, gvanrossum, mark.dickinson, martin.panter, mikehoy, rhettinger, steven.daprano, terry.reedy |
| Date |
2014年09月06日.17:17:57 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1410023878.27.0.0816209916129.issue12067@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
- This bug should discuss doc updates, not question the rules.
- The rules have evolved over time and the docs stayed behind.
- We should definitely update the 2.7 docs as well as the 3.4 and 3.5 (in development) docs. The 2.7 docs need to be different than the 3.x docs.
- The language reference manual should clearly state the rules so that implementers can use them as guidelines for implementation.
- There are several sets of relevant rules:
(a) How is each operator translated into a series of lookups and method calls, etc. It's similar to other binary operators except that the reverse for __lt__ is __gt__ instead of __rlt__, and there's an extra rule that if __ne__ doesn't exist we compute __eq__ and take the opposite.
(b) The default implementation (e.g. default == falls back to 'is', < raises TypeError).
(c) The rules for built-in types, especially numbers (if there are still special cases that aren't explained by the __xx__ methods on the various numeric types). |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2014年09月06日 17:17:58 | gvanrossum | set | recipients:
+ gvanrossum, rhettinger, terry.reedy, mark.dickinson, benjamin.peterson, ezio.melotti, steven.daprano, cvrebert, chris.jerdonek, docs@python, ethan.furman, martin.panter, mikehoy, andymaier |
| 2014年09月06日 17:17:58 | gvanrossum | set | messageid: <1410023878.27.0.0816209916129.issue12067@psf.upfronthosting.co.za> |
| 2014年09月06日 17:17:58 | gvanrossum | link | issue12067 messages |
| 2014年09月06日 17:17:57 | gvanrossum | create |
|