Yogesh Chaudhari added the comment: @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. ---------- nosy: +Yogesh.Chaudhari _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9856> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com