Message189048
@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. |
|
Date |
User |
Action |
Args |
2013-05-12 17:06:33 | Yogesh.Chaudhari | set | recipients:
+ Yogesh.Chaudhari, terry.reedy, eric.smith, Arfrever, asvetlov, flox, python-dev, krinart, Ankur.Ankan |
2013-05-12 17:06:33 | Yogesh.Chaudhari | set | messageid: <1368378393.7.0.988730083405.issue9856@psf.upfronthosting.co.za> |
2013-05-12 17:06:33 | Yogesh.Chaudhari | link | issue9856 messages |
2013-05-12 17:06:33 | Yogesh.Chaudhari | create | |
|