Message189048
| Author |
Yogesh.Chaudhari |
| Recipients |
Ankur.Ankan, Arfrever, Yogesh.Chaudhari, asvetlov, eric.smith, flox, krinart, python-dev, terry.reedy |
| Date |
2013年05月12日.17:06:33 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1368378393.7.0.988730083405.issue9856@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
@Eric:
when you say: "If the type of the object really is "object", then it can use string formatting. It's only for non-objects that I want to add the error.".
I am confused. Let me demonstrate what I'm thinking according to the statement above.
First let us take a 'non-object':
>>> integer=1
>>> type(integer) != object
True
As of now it returns the following:
>>> integer.__format__(s)
'1'
Which seems natural.
But after this patch should it return an error
Also now consider an object:
>>> f = object()
>>> type(f)
<class 'object'>
This will return the following after the patch as it does now which is:
>>> f.__format__('')
'<object object at 0xb75b7b48>'
Does this mean that 'integer' should give an error, however, 'f' should give something that appears messy?
I may be mistaken in my interpretation of the statement, so kindly let me know if there is something else that I am not clearly understanding. |
|