Message206367
| Author | ethan.furman |
|---|---|
| Recipients | Arfrever, eric.smith, ethan.furman, gvanrossum, mark.dickinson, pitrou, rhettinger, serhiy.storchaka, skrah, vstinner |
| Date | 2013-12-16.20:48:46 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1387226926.53.0.777939040208.issue19995@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
Antoine Pitrou opined:
----------------------
> I'm with Guido: it doesn't really make sense to allow __index__ but not __int__ on
> a type. So trying __index__ in str.format() sounds like a distraction.
--> hex(3.14) # calls __index__
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'float' object cannot be interpreted as an integer
--> '%x' % 3.14 # calls __int__
'3'
One of those behaviours is wrong. Which? |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2013-12-16 20:48:46 | ethan.furman | set | recipients: + ethan.furman, gvanrossum, rhettinger, mark.dickinson, pitrou, vstinner, eric.smith, Arfrever, skrah, serhiy.storchaka |
| 2013-12-16 20:48:46 | ethan.furman | set | messageid: <1387226926.53.0.777939040208.issue19995@psf.upfronthosting.co.za> |
| 2013-12-16 20:48:46 | ethan.furman | link | issue19995 messages |
| 2013-12-16 20:48:46 | ethan.furman | create | |